From 17754f9a880d57637af4853efa493c731af7516f Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Tue, 1 Aug 2017 23:12:51 +0200 Subject: [PATCH] Cleanup Angular1 modules. --- src/accounts/index.ts | 61 ----------------------------------------- src/app.ts | 60 ---------------------------------------- src/operations/index.ts | 40 --------------------------- src/scheduler/index.ts | 39 -------------------------- 4 files changed, 200 deletions(-) delete mode 100644 src/accounts/index.ts delete mode 100644 src/app.ts delete mode 100644 src/operations/index.ts delete mode 100644 src/scheduler/index.ts diff --git a/src/accounts/index.ts b/src/accounts/index.ts deleted file mode 100644 index 90fe1a3..0000000 --- a/src/accounts/index.ts +++ /dev/null @@ -1,61 +0,0 @@ -// vim: set tw=80 ts=4 sw=4 sts=4: -/* - This file is part of Accountant. - - Accountant is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - Accountant is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with Accountant. If not, see . - */ -/* jshint node: true */ -'use strict'; -var angular = require('angular'); - -//declare var angular: angular.IAngularStatic; -import { - downgradeInjectable, - downgradeComponent -} from '@angular/upgrade/static'; - -import uiRouter from '@uirouter/angularjs'; - -import { AccountService } from './account.service'; -import { AccountListComponent } from './accountList.component'; -import { DailyBalanceService } from './dailyBalance.service'; - -export default angular.module('accountant.accounts', [ - uiRouter -]) - - .factory('accountIdService', function() { - var accountId: null; - - return { - get: () => { - return accountId; - }, - set: (value) => { - accountId = value; - } - } - }) - - .directive('accountList', downgradeComponent({ - component: AccountListComponent - })) - - .run(function($transitions, accountIdService) { - $transitions.onEnter({}, (transition) => { - accountIdService.set(transition.params().accountId); - }); - }) - - .name; diff --git a/src/app.ts b/src/app.ts deleted file mode 100644 index de46970..0000000 --- a/src/app.ts +++ /dev/null @@ -1,60 +0,0 @@ -// vim: set tw=80 ts=4 sw=4 sts=4: -/* - This file is part of Accountant. - - Accountant is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - Accountant is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with Accountant. If not, see . - */ -/* jshint node: true */ -'use strict'; - -var angular = require('angular'); - -import uiRouter from '@uirouter/angularjs'; - -import { AccountListState } from './accounts/account.states'; -import { OperationListState } from './operations/operation.states'; -import { ScheduleListState } from './scheduler/schedule.states'; - -import accountModule from '@accountant/accounts'; -import loginModule from '@accountant/login'; -import operationModule from '@accountant/operations'; -import schedulerModule from '@accountant/scheduler'; - -export const AppModule = angular.module('accountant', [ - uiRouter, - accountModule, - loginModule, - operationModule, - schedulerModule, -]); - -AppModule.config(['$uiRouterProvider', ($uiRouterProvider) => { - $uiRouterProvider.trace.enable(1); - - // Defining template and controller in function of route. - const $stateRegistry = $uiRouterProvider.stateRegistry; - - $stateRegistry.register(OperationListState); - - $stateRegistry.register(ScheduleListState); - - $stateRegistry.register(AccountListState); - - const $urlService = $uiRouterProvider.urlService; - $urlService.rules.otherwise({ - state: 'accounts' - }); -}]); - -AppModule.run(['$trace', $trace => { $trace.enable(1); }]); diff --git a/src/operations/index.ts b/src/operations/index.ts deleted file mode 100644 index 7c42883..0000000 --- a/src/operations/index.ts +++ /dev/null @@ -1,40 +0,0 @@ -// vim: set tw=80 ts=4 sw=4 sts=4: -/* - This file is part of Accountant. - - Accountant is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - Accountant is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with Accountant. If not, see . - */ -/* jshint node: true */ -'use strict'; - -import * as angular from 'angular'; - -import { - downgradeInjectable, - downgradeComponent -} from '@angular/upgrade/static'; - -import accountModule from '@accountant/accounts'; - -import { OperationListComponent } from './operationList.component'; - -export default angular.module('accountant.operations', [ - accountModule, -]) - - .directive('operationListComponent', downgradeComponent({ - component: OperationListComponent - })) - - .name; diff --git a/src/scheduler/index.ts b/src/scheduler/index.ts deleted file mode 100644 index 1a3d42e..0000000 --- a/src/scheduler/index.ts +++ /dev/null @@ -1,39 +0,0 @@ -// vim: set tw=80 ts=4 sw=4 sts=4: -/* - This file is part of Accountant. - - Accountant is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - Accountant is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with Accountant. If not, see . - */ -/* jshint node: true */ -'use strict'; - -import * as angular from 'angular'; - -import { - downgradeInjectable, - downgradeComponent -} from '@angular/upgrade/static'; - -import accountModule from '@accountant/accounts'; - -import { ScheduleListComponent } from './scheduleList.component'; - -export default angular.module('accountant.scheduler', [ - accountModule -]) - .directive('scheduleListComponent', downgradeComponent({ - component: ScheduleListComponent - })) - - .name;