File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 1313 npm test 2> /dev/null
1414
1515 # build
16- npm run build
16+ VERSION= $VERSION npm run build
1717
1818 # commit
1919 git add -A
Original file line number Diff line number Diff line change @@ -46,7 +46,19 @@ module.exports = {
4646 }
4747} ;
4848
49- if ( process . env . NODE_ENV !== 'production' ) {
49+ if ( process . env . NODE_ENV === 'production' ) {
50+ // production configurations
51+ const pkg = require ( './package' ) ;
52+ const banner = [
53+ `${ pkg . name } v${ process . env . VERSION || pkg . version } ` ,
54+ `(c) 2016-${ new Date ( ) . getFullYear ( ) } ${ pkg . author . name } ` ,
55+ `${ pkg . license } License`
56+ ] . join ( '\n' ) ;
57+
58+ module . exports . plugins = [
59+ new webpack . BannerPlugin ( banner )
60+ ] ;
61+ } else {
5062 // development configurations
5163 module . exports . plugins = [
5264 new HtmlWebpackPlugin ( {
You can’t perform that action at this time.
0 commit comments