Typescript conversion.

This commit is contained in:
Alexis Lahouze 2017-07-10 15:51:58 +02:00
parent d4eaa1454c
commit 2ae971a7ad
22 changed files with 28 additions and 18 deletions

View File

@ -25,10 +25,10 @@ var ngResource = require('angular-resource'),
ngUiNotification = require('angular-ui-notification'), ngUiNotification = require('angular-ui-notification'),
ngStrap = require('angular-strap'); ngStrap = require('angular-strap');
var AccountFactory = require('./account.factory.js'); var AccountFactory = require('./account.factory');
var AccountBalancesFactory = require('./accountBalances.factory.js'); var AccountBalancesFactory = require('./accountBalances.factory');
var AccountConfig = require('./account.config.js'); var AccountConfig = require('./account.config');
var AccountController = require('./account.controller.js'); var AccountController = require('./account.controller');
module.exports = angular.module('accountant.accounts', [ module.exports = angular.module('accountant.accounts', [
ngResource, ngResource,

View File

@ -22,14 +22,14 @@ var angular = require('angular');
var ngRoute = require('angular-route'); var ngRoute = require('angular-route');
var accountModule = require('./accounts'), import accountModule from '@accountant/accounts';
loginModule = require('./login'), import loginModule from '@accountant/login';
operationModule = require('./operations'), import operationModule from '@accountant/operations';
schedulerModule = require('./scheduler'); import schedulerModule from '@accountant/scheduler';
var routing = require('./app.config'); var routing = require('./app.config.ts');
require('bootstrap-webpack!./bootstrap.config.js'); require('bootstrap-webpack!./bootstrap.config.ts');
angular.module('accountant', [ angular.module('accountant', [
ngRoute, ngRoute,

View File

@ -27,15 +27,16 @@ var ngResource = require('angular-resource'),
ngUiNotification = require('angular-ui-notification'), ngUiNotification = require('angular-ui-notification'),
ngStrap = require('angular-strap'); ngStrap = require('angular-strap');
var balanceChartModule = require('./balance-chart.component.js'), var balanceChartModule = require('./balance-chart.component'),
categoryChartModule = require('./category-chart.component.js'), categoryChartModule = require('./category-chart.component');
accountModule = require('../accounts');
import accountModule from '../accounts/index';
var OperationFactory = require('./operation.factory'); var OperationFactory = require('./operation.factory');
var OperationConfig = require('./operation.config'); var OperationConfig = require('./operation.config');
var OperationController = require('./operation.controller'); var OperationController = require('./operation.controller');
module.exports = angular.module('accountant.operations', [ export default angular.module('accountant.operations', [
ngResource, ngResource,
ngMessages, ngMessages,
ngUiNotification, ngUiNotification,

View File

@ -24,9 +24,9 @@ var ngMessages = require('angular-messages'),
ngUiNotification = require('angular-ui-notification'), ngUiNotification = require('angular-ui-notification'),
ngStrap = require('angular-strap'); ngStrap = require('angular-strap');
var ScheduleConfig = require('./schedule.config.js'); var ScheduleConfig = require('./schedule.config');
var ScheduleController = require('./schedule.controller.js'); var ScheduleController = require('./schedule.controller');
var ScheduleFactory = require('./schedule.factory.js'); var ScheduleFactory = require('./schedule.factory');
module.exports = angular.module('accountant.scheduler', [ module.exports = angular.module('accountant.scheduler', [
ngMessages, ngMessages,

View File

@ -5,8 +5,17 @@ const webpack = require('webpack');
module.exports = { module.exports = {
context: path.resolve(__dirname, 'src'), context: path.resolve(__dirname, 'src'),
entry: './app.js', entry: './app.ts',
devtool: 'source-map', devtool: 'source-map',
resolve: {
extensions: ['.js', '.jsx', '.ts', '.tsx', '.html'],
alias: {
'@accountant/accounts': './accounts/index.ts',
'@accountant/operations': './operations/index.ts',
'@accountant/login': './login/index.ts',
'@accountant/scheduler': './scheduler/index.ts'
}
},
module: { module: {
rules: [{ rules: [{
enforce: 'pre', enforce: 'pre',