Merge pull request #10 from radswiat/feature/improvements
Fix aiv log full issue due to no argv execution
This commit is contained in:
commit
1db0038d53
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
|
/******/ (function(modules) { // webpackBootstrap
|
||||||
/******/ // The module cache
|
/******/ // The module cache
|
||||||
/******/ var installedModules = {};
|
/******/ var installedModules = {};
|
||||||
|
@ -71,7 +71,7 @@
|
||||||
/* 0 */
|
/* 0 */
|
||||||
/***/ (function(module, exports) {
|
/***/ (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 */
|
/* 1 */
|
||||||
|
|
|
@ -14,5 +14,8 @@
|
||||||
"html-minify-loader": "^1.1.0",
|
"html-minify-loader": "^1.1.0",
|
||||||
"raw-loader": "^0.5.1",
|
"raw-loader": "^0.5.1",
|
||||||
"webpack": "^2.3.3"
|
"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}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
function isArgv(arg) {
|
function isArgv(arg) {
|
||||||
|
if (typeof argv.env === 'undefined') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (typeof argv.env[arg] === 'undefined') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return Boolean(argv.env[arg]);
|
return Boolean(argv.env[arg]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "webpack-auto-inject-version",
|
"name": "webpack-auto-inject-version",
|
||||||
"version": "0.5.1",
|
"version": "0.5.3",
|
||||||
"repository": "radswiat/webpack-auto-inject-version",
|
"repository": "radswiat/webpack-auto-inject-version",
|
||||||
"description": "Webpack plugin for auto inject version from package.json",
|
"description": "Webpack plugin for auto inject version from package.json",
|
||||||
"main": "dist/WebpackAutoInjectVersion.js",
|
"main": "dist/WebpackAutoInjectVersion.js",
|
||||||
|
|
|
@ -9,6 +9,12 @@ let argv = require('optimist').argv;
|
||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
export function isArgv(arg) {
|
export function isArgv(arg) {
|
||||||
|
if (typeof argv.env === 'undefined') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (typeof argv.env[arg] === 'undefined') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return Boolean(argv.env[arg]);
|
return Boolean(argv.env[arg]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue