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 13
13
npm test 2> /dev/null
14
14
15
15
# build
16
- npm run build
16
+ VERSION= $VERSION npm run build
17
17
18
18
# commit
19
19
git add -A
Original file line number Diff line number Diff line change @@ -46,7 +46,19 @@ module.exports = {
46
46
}
47
47
} ;
48
48
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 {
50
62
// development configurations
51
63
module . exports . plugins = [
52
64
new HtmlWebpackPlugin ( {
You can’t perform that action at this time.
0 commit comments