Comparing version 0.1.6 to 0.1.7
12
index.js
@@ -10,6 +10,8 @@ var gulp = require('gulp'); | ||
module.exports = function gulpJsMinify(config) { | ||
var name = 'lab'; | ||
if(config.name) name = config.name; | ||
if(config.production) var files = config.productionFiles; | ||
else var files = config.files; | ||
if (fs.existsSync(config.way + 'lab-min.js')) { | ||
var data = fs.readFileSync(config.way + 'lab-min.js', 'utf8'); | ||
if (fs.existsSync(config.way + name + '-min.js')) { | ||
var data = fs.readFileSync(config.way + name + '-min.js', 'utf8'); | ||
var lines = data.split("\n"); | ||
@@ -20,3 +22,3 @@ if (lines[lines.length - 1].indexOf(files.toString() + config.way + config.prefix) > -1) return; | ||
.pipe(sourcemaps.init()) | ||
.pipe(concat('lab.js')) | ||
.pipe(concat(name + '.js')) | ||
.pipe(ngAnnotate()) | ||
@@ -29,4 +31,4 @@ .pipe(sourcemaps.write()) | ||
.pipe(gulpFn(function() { | ||
fs.appendFile(config.way + 'lab-min.js', '\r\n/*' + files.toString() + config.way + config.prefix + '*/', function(err) {}); | ||
fs.appendFile(config.way + name + '-min.js', '\r\n/*' + files.toString() + config.way + config.prefix + '*/', function(err) {}); | ||
})); | ||
}; | ||
}; |
@@ -52,3 +52,3 @@ { | ||
"scripts": {}, | ||
"version": "0.1.6" | ||
"version": "0.1.7" | ||
} |
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
3446
30