Fix aiv log full issue due to no argv execution
This commit is contained in:
parent
a158b4075c
commit
04bc44a87a
5 changed files with 18 additions and 3 deletions
4
demo/dist/index-bundle.js
vendored
4
demo/dist/index-bundle.js
vendored
|
@ -1,4 +1,4 @@
|
|||
// [AIV] Build version: 0.5.1
|
||||
// [AIV] Build version: 0.5.2
|
||||
/******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
|
@ -71,7 +71,7 @@
|
|||
/* 0 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = "<!DOCTYPE html><html lang=en><head><meta charset=UTF-8><title>Title</title></head><body><span>My awesome project | 0.5.1></span></body></html>"
|
||||
module.exports = "<!DOCTYPE html><html lang=en><head><meta charset=UTF-8><title>Title</title></head><body><span>My awesome project | 0.5.2></span></body></html>"
|
||||
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
|
|
|
@ -14,5 +14,8 @@
|
|||
"html-minify-loader": "^1.1.0",
|
||||
"raw-loader": "^0.5.1",
|
||||
"webpack": "^2.3.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"webpack-auto-inject-version": "^0.5.1"
|
||||
}
|
||||
}
|
||||
|
|
6
dist/WebpackAutoInjectVersion.js
vendored
6
dist/WebpackAutoInjectVersion.js
vendored
|
@ -273,6 +273,12 @@ var argv = __webpack_require__(18).argv;
|
|||
* @returns {boolean}
|
||||
*/
|
||||
function isArgv(arg) {
|
||||
if (typeof argv.env === 'undefined') {
|
||||
return false;
|
||||
}
|
||||
if (typeof argv.env[arg] === 'undefined') {
|
||||
return false;
|
||||
}
|
||||
return Boolean(argv.env[arg]);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "webpack-auto-inject-version",
|
||||
"version": "0.5.1",
|
||||
"version": "0.5.3",
|
||||
"repository": "radswiat/webpack-auto-inject-version",
|
||||
"description": "Webpack plugin for auto inject version from package.json",
|
||||
"main": "dist/WebpackAutoInjectVersion.js",
|
||||
|
|
|
@ -9,6 +9,12 @@ let argv = require('optimist').argv;
|
|||
* @returns {boolean}
|
||||
*/
|
||||
export function isArgv(arg) {
|
||||
if (typeof argv.env === 'undefined') {
|
||||
return false;
|
||||
}
|
||||
if (typeof argv.env[arg] === 'undefined') {
|
||||
return false;
|
||||
}
|
||||
return Boolean(argv.env[arg]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue