webpack-auto-inject-version
Advanced tools
Comparing version 0.0.17 to 0.0.18
var chalk = require('chalk'); | ||
var path = require('path'); | ||
var endOfLine = require('os').EOL; | ||
var config = require('./config'); | ||
var config = require('./../config'); | ||
'use strict'; | ||
@@ -32,11 +32,11 @@ var InjectIntoAnyFile = (function () { | ||
InjectIntoAnyFile.prototype.injectIntoCss = function (asset) { | ||
var modAsset = "/** [" + config.SHORT + "] Build version: **/ " + endOfLine + " " + asset.source() + " "; | ||
var modAsset = "/** [" + config.SHORT + "] Build version: " + this.context.version + " **/ " + endOfLine + " " + asset.source() + " "; | ||
asset.source = function () { return modAsset; }; | ||
}; | ||
InjectIntoAnyFile.prototype.injectIntoHtml = function (asset) { | ||
var modAsset = "<!-- [" + config.SHORT + "] Build version: --> " + endOfLine + " " + asset.source() + " "; | ||
var modAsset = "<!-- [" + config.SHORT + "] Build version: " + this.context.version + " --> " + endOfLine + " " + asset.source() + " "; | ||
asset.source = function () { return modAsset; }; | ||
}; | ||
InjectIntoAnyFile.prototype.injectIntoJs = function (asset) { | ||
var modAsset = "// [" + config.SHORT + "] Build version: " + endOfLine + " " + asset.source() + " "; | ||
var modAsset = "// [" + config.SHORT + "] Build version: " + this.context.version + " " + endOfLine + " " + asset.source() + " "; | ||
asset.source = function () { return modAsset; }; | ||
@@ -43,0 +43,0 @@ }; |
@@ -10,2 +10,3 @@ var chalk = require('chalk'); | ||
this.version = packageFile.version; | ||
console.log('versioooon: ' + this.version); | ||
} | ||
@@ -12,0 +13,0 @@ WebpackAutoInject.prototype.apply = function (compiler) { |
{ | ||
"name": "webpack-auto-inject-version", | ||
"version": "0.0.17", | ||
"version": "0.0.18", | ||
"description": "Webpack plugin for auto inject version from package.json", | ||
@@ -5,0 +5,0 @@ "main": "dist/main.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
181660
3722