Skip to content

Commit

Permalink
chore(build): use webpack to copy assets to target folder
Browse files Browse the repository at this point in the history
  • Loading branch information
r-park committed Dec 23, 2016
1 parent 43c87ef commit e1c566c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion bin/postbuild.copy-assets.sh

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"lint": "run-s lint:js lint:ts",
"lint:js": "eslint -c .eslintrc.yml *.js ./server",
"lint:ts": "tslint './src/**/*.ts'",
"postbuild": "./bin/postbuild.copy-assets.sh",
"posttest": "run-s coverage:html coverage:lcov",
"prebuild": "run-s clean:target test",
"pretest": "run-s clean:coverage lint",
Expand Down Expand Up @@ -53,6 +52,7 @@
"@types/node": "~6.0.46",
"@types/request": "0.0.30",
"autoprefixer": "~6.5.1",
"copy-webpack-plugin": "~4.0.1",
"coveralls": "~2.11.14",
"cross-env": "~3.1.3",
"css-loader": "~0.25.0",
Expand Down
4 changes: 4 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const path = require('path');
const autoprefixer = require('autoprefixer');
const CommonsChunkPlugin = require('webpack/lib/optimize/CommonsChunkPlugin');
const ContextReplacementPlugin = require('webpack/lib/ContextReplacementPlugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const DefinePlugin = require('webpack/lib/DefinePlugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
Expand Down Expand Up @@ -124,6 +125,9 @@ if (ENV_DEVELOPMENT || ENV_PRODUCTION) {
name: ['vendor', 'polyfills'],
minChunks: Infinity
}),
new CopyWebpackPlugin([
{from: './assets/favicons', to: '.'}
]),
new HtmlWebpackPlugin({
chunkSortMode: 'dependency',
filename: 'index.html',
Expand Down

0 comments on commit e1c566c

Please sign in to comment.