Remove console logs
This commit is contained in:
parent
b7e9f047fd
commit
a158b4075c
4 changed files with 4 additions and 11 deletions
4
demo/dist/index-bundle.js
vendored
4
demo/dist/index-bundle.js
vendored
|
@ -1,4 +1,4 @@
|
|||
// [AIV] Build version: 0.2.12
|
||||
// [AIV] Build version: 0.5.1
|
||||
/******/ (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.2.12></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.1></span></body></html>"
|
||||
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
var path = require('path');
|
||||
// Require WebpackAutoInject from npm installed modules ( prefered )
|
||||
// Require WebpackAutoInject from npm installed modules ( preferred )
|
||||
// var WebpackAutoInject = require('webpack-auto-inject-version').default;
|
||||
// Require WebpackAutoInject from dist - dev purpose only ( do not use the below line )
|
||||
var WebpackAutoInject = require('../dist/WebpackAutoInjectVersion').default;
|
||||
|
|
7
dist/WebpackAutoInjectVersion.js
vendored
7
dist/WebpackAutoInjectVersion.js
vendored
|
@ -632,22 +632,15 @@ var InjectByTag = function () {
|
|||
value: function apply() {
|
||||
var _this = this;
|
||||
|
||||
console.log('------------------- INJECT BY TAG! ------------------');
|
||||
this.context.compiler.plugin('emit', function (compilation, cb) {
|
||||
console.log('------------------- INJECT BY TAG! APPLY! ------------------');
|
||||
console.log(compilation.assets);
|
||||
// for every output file
|
||||
for (var basename in compilation.assets) {
|
||||
console.log(_chalk2.default.green.bold('================='));
|
||||
console.log(basename);
|
||||
// only if match regex
|
||||
console.log(basename + ' is: ' + _this.context.config.componentsOptions.InjectByTag.fileRegex.test(basename));
|
||||
if (_this.context.config.componentsOptions.InjectByTag.fileRegex.test(basename)) {
|
||||
(function () {
|
||||
var replaced = 0;
|
||||
var asset = compilation.assets[basename];
|
||||
var modFile = asset.source().replace(/(\[AIV\]{version}\[\/AIV\])/g, function () {
|
||||
console.log('replace?!');
|
||||
replaced++;
|
||||
return _this.context.version;
|
||||
});
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "webpack-auto-inject-version",
|
||||
"version": "0.5.0",
|
||||
"version": "0.5.1",
|
||||
"repository": "radswiat/webpack-auto-inject-version",
|
||||
"description": "Webpack plugin for auto inject version from package.json",
|
||||
"main": "dist/WebpackAutoInjectVersion.js",
|
||||
|
|
Loading…
Reference in a new issue