We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b3f5da6 commit 26aafe7Copy full SHA for 26aafe7
release.sh
@@ -13,7 +13,7 @@ then
13
npm test 2>/dev/null
14
15
# build
16
- npm run build
+ VERSION=$VERSION npm run build
17
18
# commit
19
git add -A
webpack.config.js
@@ -46,7 +46,19 @@ module.exports = {
46
}
47
};
48
49
-if (process.env.NODE_ENV !== 'production') {
+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 {
62
// development configurations
63
module.exports.plugins = [
64
new HtmlWebpackPlugin({
0 commit comments