From a7f37e88a9ef144e83cfc43e2766277ca5a73d14 Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Thu, 6 Jul 2017 10:35:15 +0200 Subject: [PATCH] Exports module name instead of module itself. --- src/accounts/index.js | 6 +++--- src/app.js | 8 ++++---- src/login/index.js | 6 +++--- src/operations/balance-chart.component.js | 8 ++++---- src/operations/category-chart.component.js | 6 +++--- src/operations/index.js | 10 +++++----- src/scheduler/index.js | 6 +++--- 7 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/accounts/index.js b/src/accounts/index.js index 89ef412..30d4d31 100644 --- a/src/accounts/index.js +++ b/src/accounts/index.js @@ -28,7 +28,7 @@ var ngResource = require('angular-resource'), var accountFormTmpl = require('./account.form.tmpl.html'), accountDeleteTmpl = require('./account.delete.tmpl.html'); -var accountModule = angular.module('accountant.accounts', [ +module.exports = angular.module('accountant.accounts', [ ngResource, ngMessages, ngUiBootstrap, @@ -271,6 +271,6 @@ var accountModule = angular.module('accountant.accounts', [ } }; } - }); + }) -module.exports = accountModule; + .name; diff --git a/src/app.js b/src/app.js index 3b63321..7af9bcf 100644 --- a/src/app.js +++ b/src/app.js @@ -34,10 +34,10 @@ var accountsTmpl = require('./accounts/accounts.html'); var schedulerTmpl = require('./scheduler/scheduler.html'); var app = angular.module('accountant', [ - accountModule.name, - loginModule.name, - operationModule.name, - schedulerModule.name, + accountModule, + loginModule, + operationModule, + schedulerModule, ngRoute, ]) diff --git a/src/login/index.js b/src/login/index.js index 76bd4d0..897a84d 100644 --- a/src/login/index.js +++ b/src/login/index.js @@ -31,7 +31,7 @@ var loginTmpl = require('./login.tmpl.html'); var base64 = require('base64util'); -var loginModule = angular.module('accountant.login', [ +module.exports = angular.module('accountant.login', [ ngHttpAuth, ngStorage, ngUiBootstrap @@ -153,6 +153,6 @@ var loginModule = angular.module('accountant.login', [ $rootScope.$on('$destroy', function() { onAuthLoginRequired = angular.noop(); }); - }); + }) -module.exports = loginModule; + .name; diff --git a/src/operations/balance-chart.component.js b/src/operations/balance-chart.component.js index e2a3173..688f814 100644 --- a/src/operations/balance-chart.component.js +++ b/src/operations/balance-chart.component.js @@ -27,8 +27,8 @@ var account = require('../accounts'); var ngResource = require('angular-resource'); -var balanceChartModule = angular.module('balanceChartModule', [ - account.name, +module.exports = angular.module('balanceChartModule', [ + account, ngResource ]) @@ -188,6 +188,6 @@ var balanceChartModule = angular.module('balanceChartModule', [ id: '@id' } ); - }); + }) -module.exports = balanceChartModule; + .name; diff --git a/src/operations/category-chart.component.js b/src/operations/category-chart.component.js index 06f9f1d..05e6413 100644 --- a/src/operations/category-chart.component.js +++ b/src/operations/category-chart.component.js @@ -25,7 +25,7 @@ var angular = require('angular'); var ngResource = require('angular-resource'); -var categoryChartModule = angular.module('categoryChartModule', [ +module.exports = angular.module('categoryChartModule', [ ngResource ]) @@ -132,6 +132,6 @@ var categoryChartModule = angular.module('categoryChartModule', [ id: '@id' } ); - }); + }) -module.exports = categoryChartModule; + .name; diff --git a/src/operations/index.js b/src/operations/index.js index d1521f1..a3ed94a 100644 --- a/src/operations/index.js +++ b/src/operations/index.js @@ -34,14 +34,14 @@ var ngResource = require('angular-resource'), ngUiNotification = require('angular-ui-notification'), ngStrap = require('angular-strap'); -var operationModule = angular.module('accountant.operations', [ +module.exports = angular.module('accountant.operations', [ ngResource, ngMessages, ngUiBootstrap, ngUiNotification, ngStrap, - balanceChartModule.name, - categoryChartModule.name + balanceChartModule, + categoryChartModule ]) .config(function($resourceProvider) { @@ -264,6 +264,6 @@ var operationModule = angular.module('accountant.operations', [ } }; } - }); + }) -module.exports = operationModule; + .name; diff --git a/src/scheduler/index.js b/src/scheduler/index.js index d5b5c96..30b209f 100644 --- a/src/scheduler/index.js +++ b/src/scheduler/index.js @@ -28,7 +28,7 @@ var ngMessages = require('angular-messages'), ngUiNotification = require('angular-ui-notification'), ngStrap = require('angular-strap'); -var schedulerModule = angular.module('accountant.scheduler', [ +module.exports = angular.module('accountant.scheduler', [ ngMessages, ngUiBootstrap, ngUiNotification, @@ -225,6 +225,6 @@ var schedulerModule = angular.module('accountant.scheduler', [ } }; } - }); + }) -module.exports = schedulerModule; + .name;