Skip to content
This repository has been archived by the owner on Nov 21, 2019. It is now read-only.

Commit

Permalink
feat: add uglify-js (#16)
Browse files Browse the repository at this point in the history
* build(webpack): add uglify-js

* chore(package): add uglify-js to deps

* docs(readme): update readme
  • Loading branch information
Burak Tasci authored Oct 9, 2017
1 parent c1dc7e6 commit f06c3fa
Show file tree
Hide file tree
Showing 4 changed files with 249 additions and 21 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This repository holds the [TypeScript] source code and distributable bundle of *

- [x] Ready-to-go build system using [Webpack] to work with [TypeScript].
- [x] Managing the type definitions using [@types].
- [ ] Minifying the production builds using `harmony` branch of [UglifyJs2].
- [x] Minifying the production builds using [UglifyJS Webpack Plugin].
- [x] Unit tests with **[Jest]**, including code coverage.
- [x] Seamless integration with [CircleCI] continuous integration and delivery platform.
- [x] Automatic deployment to [Azure Functions].
Expand Down Expand Up @@ -145,7 +145,7 @@ Copyright (c) 2017 [Burak Tasci]
[TypeScript]: http://www.typescriptlang.org
[Webpack]: http://webpack.github.io
[@types]: https://www.npmjs.com/~types
[UglifyJs2]: https://github.com/mishoo/UglifyJS2/tree/harmony
[UglifyJS Webpack Plugin]: https://github.com/webpack-contrib/uglifyjs-webpack-plugin
[Jest]: https://facebook.github.io/jest
[CircleCI]: https://circleci.com
[Azure Functions]: https://azure.microsoft.com/en-us/services/functions
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"cp-cli": "~1.1.0",
"webpack": "~3.6.0",
"awesome-typescript-loader": "~3.2.3",
"uglifyjs-webpack-plugin": "^1.0.0-beta.2",
"copy-webpack-plugin": "~4.1.0",
"jest": "~21.2.1",
"jest-junit-reporter": "~1.1.0",
Expand Down
6 changes: 6 additions & 0 deletions tools/build/webpack.prod.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const $ = require('./helpers');
const uglifyJSPlugin = require('uglifyjs-webpack-plugin');
const copyWebpackPlugin = require('copy-webpack-plugin');

module.exports = {
Expand All @@ -21,6 +22,11 @@ module.exports = {
]
},
plugins: [
new uglifyJSPlugin({
uglifyOptions: {
ecma: 6
}
}),
new copyWebpackPlugin([
{
from: 'src/host.json',
Expand Down
Loading

0 comments on commit f06c3fa

Please sign in to comment.