|
|
@ -9,7 +9,7 @@ |
|
|
|
* update package.json file |
|
|
|
*/ |
|
|
|
|
|
|
|
var |
|
|
|
let |
|
|
|
gulp = require('gulp'), |
|
|
|
|
|
|
|
// node dependencies
|
|
|
@ -43,7 +43,7 @@ var |
|
|
|
|
|
|
|
|
|
|
|
module.exports = function(callback) { |
|
|
|
var |
|
|
|
let |
|
|
|
stream, |
|
|
|
index, |
|
|
|
tasks = [] |
|
|
@ -51,14 +51,14 @@ module.exports = function(callback) { |
|
|
|
|
|
|
|
for(index in release.distributions) { |
|
|
|
|
|
|
|
var |
|
|
|
let |
|
|
|
distribution = release.distributions[index] |
|
|
|
; |
|
|
|
|
|
|
|
// streams... designed to save time and make coding fun...
|
|
|
|
(function(distribution) { |
|
|
|
|
|
|
|
var |
|
|
|
let |
|
|
|
distLowerCase = distribution.toLowerCase(), |
|
|
|
outputDirectory = path.join(release.outputRoot, distLowerCase), |
|
|
|
packageFile = path.join(outputDirectory, release.files.npm), |
|
|
@ -81,8 +81,9 @@ module.exports = function(callback) { |
|
|
|
|
|
|
|
// get files for meteor
|
|
|
|
gatherFiles = function(dir) { |
|
|
|
var |
|
|
|
dir = dir || path.resolve('.'), |
|
|
|
dir = dir || path.resolve('.'); |
|
|
|
|
|
|
|
let |
|
|
|
list = fs.readdirSync(dir), |
|
|
|
omitted = [ |
|
|
|
'.git', |
|
|
@ -97,7 +98,7 @@ module.exports = function(callback) { |
|
|
|
files = [] |
|
|
|
; |
|
|
|
list.forEach(function(file) { |
|
|
|
var |
|
|
|
let |
|
|
|
isOmitted = (omitted.indexOf(file) > -1), |
|
|
|
filePath = path.join(dir, file), |
|
|
|
stat = fs.statSync(filePath) |
|
|
@ -116,8 +117,8 @@ module.exports = function(callback) { |
|
|
|
|
|
|
|
// spaces out list correctly
|
|
|
|
createList = function(files) { |
|
|
|
var filenames = ''; |
|
|
|
for(var file in files) { |
|
|
|
let filenames = ''; |
|
|
|
for(let file in files) { |
|
|
|
if(file == (files.length - 1) ) { |
|
|
|
filenames += "'" + files[file] + "'"; |
|
|
|
} |
|
|
@ -130,7 +131,7 @@ module.exports = function(callback) { |
|
|
|
|
|
|
|
|
|
|
|
gulp.task(task.meteor, function() { |
|
|
|
var |
|
|
|
let |
|
|
|
files = gatherFiles(outputDirectory), |
|
|
|
filenames = createList(files) |
|
|
|
; |
|
|
@ -146,7 +147,7 @@ module.exports = function(callback) { |
|
|
|
|
|
|
|
if(distribution == 'CSS') { |
|
|
|
gulp.task(task.repo, function() { |
|
|
|
var |
|
|
|
let |
|
|
|
themes, |
|
|
|
components, |
|
|
|
releases |
|
|
@ -165,7 +166,7 @@ module.exports = function(callback) { |
|
|
|
} |
|
|
|
else if(distribution == 'LESS') { |
|
|
|
gulp.task(task.repo, function() { |
|
|
|
var |
|
|
|
let |
|
|
|
definitions, |
|
|
|
themeImport, |
|
|
|
themeConfig, |
|
|
@ -198,11 +199,11 @@ module.exports = function(callback) { |
|
|
|
gulp.task(task.package, function() { |
|
|
|
return gulp.src(packageFile) |
|
|
|
.pipe(plumber()) |
|
|
|
.pipe(jsonEditor(function(package) { |
|
|
|
.pipe(jsonEditor(function(json) { |
|
|
|
if(version) { |
|
|
|
package.version = version; |
|
|
|
json.version = version; |
|
|
|
} |
|
|
|
return package; |
|
|
|
return json; |
|
|
|
})) |
|
|
|
.pipe(gulp.dest(outputDirectory)) |
|
|
|
; |
|
|
|