Use webpack.

This commit is contained in:
Alexis Lahouze 2017-06-10 18:02:19 +02:00
parent 1a43135e55
commit 5c25d5c79f
4 changed files with 110 additions and 27 deletions

View File

@ -15,13 +15,27 @@
You should have received a copy of the GNU Affero General Public License
along with Accountant. If not, see <http://www.gnu.org/licenses/>.
*/
/* jshint node: true */
'use strict';
angular.module('accountant.accounts', [
'ngResource',
'ngMessages',
'ui-notification',
'ngBootbox'
var angular = require('angular');
var ngResource = require('angular-resource'),
ngMessages = require('angular-messages'),
ngUiNotification = require('angular-ui-notification'),
ngBootbox = require('ngbootbox');
// Note: ngBootbox seems to have no module.exports.
ngBootbox = 'ngBootbox';
// FIXME Alexis Lahouze 2017-06-06 move into templates.js.
require('../views/account.form.tmpl.html');
var accountModule = angular.module('accountant.accounts', [
ngResource,
ngMessages,
ngUiNotification,
ngBootbox
])
.config(function($resourceProvider) {
@ -245,3 +259,5 @@ angular.module('accountant.accounts', [
}
};
});
module.exports = accountModule;

View File

@ -15,16 +15,44 @@
You should have received a copy of the GNU Affero General Public License
along with Accountant. If not, see <http://www.gnu.org/licenses/>.
*/
/* jshint node: true */
'use strict';
angular.module('accountant', [
'accountant.accounts',
'accountant.operations',
'accountant.scheduler',
'ngRoute',
'ngBootbox',
'http-auth-interceptor',
'Storage.Service'
var angular = require('angular');
var ngRoute = require('angular-route'),
ngBootbox = require('ngbootbox'),
ngStorage = require('meanie-angular-storage'),
ngHttpAuth = require('angular-http-auth');
var base64 =require('base64util');
// Note: ngBootbox seems to have no module.exports.
ngBootbox = 'ngBootbox';
// Note: ngHttpAuth seems to have no module.exports.
ngHttpAuth = 'http-auth-interceptor';
var accountModule = require('./accounts'),
operationModule = require('./operations'),
schedulerModule = require('./scheduler');
require('bootstrap-webpack!./bootstrap.config.js');
require('../views/operations.html');
require('../views/accounts.html');
require('../views/scheduler.html');
require('../views/login.tmpl.html');
var app = angular.module('accountant', [
accountModule.name,
operationModule.name,
schedulerModule.name,
ngRoute,
ngBootbox,
ngHttpAuth,
ngStorage
])
.factory('sessionInjector', function($storage) {
@ -162,3 +190,5 @@ angular.module('accountant', [
})
;
module.exports = app;

View File

@ -15,16 +15,34 @@
You should have received a copy of the GNU Affero General Public License
along with Accountant. If not, see <http://www.gnu.org/licenses/>.
*/
/* jshint node: true */
'use strict';
angular.module('accountant.operations', [
'accountant.accounts',
'ngRoute',
'ngResource',
'ngBootbox',
'ui-notification',
'mgcrea.ngStrap',
'highcharts-ng'
var moment = require('moment'),
Highcharts = require('highstock-release');
var angular = require('angular');
require('../views/operation.form.tmpl.html');
var ngResource = require('angular-resource'),
ngMessages = require('angular-messages'),
ngUiNotification = require('angular-ui-notification'),
ngBootbox = require('ngbootbox'),
ngStrap = require('angular-strap');
// Note: ngBootbox seems to have no module.exports.
ngBootbox = 'ngBootbox';
var accountModule = require('./accounts');
var operationModule = angular.module('accountant.operations', [
accountModule.name,
ngResource,
ngMessages,
ngUiNotification,
ngBootbox,
ngStrap
])
.config(function($resourceProvider) {
@ -539,3 +557,5 @@ angular.module('accountant.operations', [
}
};
});
module.exports = operationModule;

View File

@ -15,14 +15,29 @@
You should have received a copy of the GNU Affero General Public License
along with Accountant. If not, see <http://www.gnu.org/licenses/>.
*/
/* jshint node: true */
'use strict';
angular.module('accountant.scheduler', [
'ngRoute',
'ngBootbox',
'ui-notification',
'xeditable',
'mgcrea.ngStrap'
var angular = require('angular');
var ngMessages = require('angular-messages'),
ngUiNotification = require('angular-ui-notification'),
ngBootbox = require('ngbootbox'),
ngStrap = require('angular-strap'),
ngXEditable = require('angular-xeditable');
// Note: ngBootbox seems to have no module.exports.
ngBootbox = 'ngBootbox';
// Note: angular-xeditable seems to have no module.exports.
ngXEditable = 'xeditable';
var schedulerModule = angular.module('accountant.scheduler', [
ngMessages,
ngUiNotification,
ngBootbox,
ngXEditable,
ngStrap
])
.config(function($resourceProvider) {
@ -122,3 +137,5 @@ angular.module('accountant.scheduler', [
})
;
module.exports = schedulerModule;