Skip to content

Commit

Permalink
chore(test): Switch to fork-ts-checker-webpack-plugin. Update libs
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherthielen committed Oct 5, 2017
1 parent 03d9234 commit bd6046a
Show file tree
Hide file tree
Showing 4 changed files with 624 additions and 1,758 deletions.
2 changes: 0 additions & 2 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ function karmaServedFiles(ngVersion) {
}

var webpackConfig = require('./webpack.config.js');
webpackConfig.entry = {};
webpackConfig.plugins = [];
webpackConfig.devtool = 'inline-source-map';

module.exports = function(config) {
Expand Down
33 changes: 12 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,31 +81,23 @@
"devDependencies": {
"@types/angular": "^1.5.14",
"@types/angular-animate": "^1.5.5",
"@types/angular-mocks": "^1.5.5",
"@types/jasmine": "^2.2.34",
"@types/angular-mocks": "1.5.11",
"@types/jasmine": "2.6.0",
"@types/jquery": "^1.10.31",
"@uirouter/publish-scripts": "1.0.7",
"awesome-typescript-loader": "3.2.3",
"babel-core": "^5.8.14",
"clone": "^1.0.2",
"conventional-changelog": "1.1.5",
"conventional-changelog-cli": "1.3.3",
"conventional-changelog": "1.1.6",
"conventional-changelog-cli": "1.3.4",
"dts-downlevel": "^0.3.0",
"glob": "^7.0.5",
"jasmine-core": "^2.4.1",
"karma": "^1.2.0",
"karma-chrome-launcher": "~0.1.0",
"karma-coverage": "^0.5.3",
"fork-ts-checker-webpack-plugin": "^0.2.8",
"jasmine-core": "2.8.0",
"karma": "1.7.1",
"karma-chrome-launcher": "2.2.0",
"karma-jasmine": "^1.0.2",
"karma-phantomjs-launcher": "^1.0.2",
"karma-script-launcher": "~0.1.0",
"karma-sourcemap-loader": "^0.3.7",
"karma-systemjs": "^0.7.2",
"karma-webpack": "^1.8.0",
"karma-webpack": "2.0.4",
"lodash": "^4.5.1",
"readline-sync": "^1.4.5",
"remap-istanbul": "^0.6.3",
"replace-in-file": "^2.0.3",
"replace-in-file": "2.6.4",
"rollup": "0.50.0",
"rollup-plugin-node-resolve": "3.0.0",
"rollup-plugin-progress": "0.4.0",
Expand All @@ -114,7 +106,7 @@
"rollup-plugin-visualizer": "0.3.1",
"shelljs": "^0.7.0",
"shx": "0.2.2",
"systemjs": "^0.18.4",
"ts-loader": "^2.3.7",
"tslint": "5.7.0",
"typedoc": "~0.5.0",
"typedoc-plugin-external-module-name": "^1.0.2",
Expand All @@ -123,8 +115,7 @@
"typescript": "2.5.3",
"ui-router-typedoc-themes": "^1.0.1",
"watch": "^0.18.0",
"webpack": "1.x",
"webpack-dev-server": "1.x",
"webpack": "3.6.0",
"yargs": "^4.2.0"
}
}
54 changes: 14 additions & 40 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,53 +1,27 @@
var pkg = require('./package.json');
var banner = pkg.description + '\n' +
'@version v' + pkg.version + '\n' +
'@link ' + pkg.homepage + '\n' +
'@license MIT License, http://www.opensource.org/licenses/MIT';
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');

var webpack = require('webpack');
module.exports = {
entry: {
"angular-ui-router": "./src/index.ts",
"angular-ui-router.min": "./src/index.ts",
"stateEvents": "./src/legacy/stateEvents.ts",
"stateEvents.min": "./src/legacy/stateEvents.ts",
'angular-ui-router': './src/index.ts',
'stateEvents': './src/legacy/stateEvents.ts',
},

output: {
path: __dirname + "/release",
filename: "[name].js",
libraryTarget: "umd",
library: "@uirouter/angularjs",
umdNamedDefine: true
},

devtool: 'source-map',

resolve: {
modulesDirectories: ['node_modules'],
extensions: ['', '.js', '.ts']
modules: ['node_modules'],
extensions: ['.js', '.jsx', '.ts', '.tsx']
},

plugins: [
new webpack.optimize.UglifyJsPlugin({
include: /\.min\.js$/, minimize: true
}),
new webpack.BannerPlugin(banner)
],

module: {
loaders: [
{ test: /\.tsx?$/, loader: "awesome-typescript-loader?noEmit=true" }
rules: [
{ test: /\.tsx?$/, loader: 'ts-loader', options: { transpileOnly: true } }
]
},

ts: {
compilerOptions: {
declaration: false
}
},

externals: {
"angular": { root: 'angular', amd: 'angular', commonjs2: 'angular', commonjs: 'angular' }
}
stats: false,

plugins: [
new ForkTsCheckerWebpackPlugin(),
],

externals: [ 'angular' ]
};
Loading

0 comments on commit bd6046a

Please sign in to comment.