Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
};
// console.log('grunt.tasks', grunt.tasks);
function done() {
console.log('grunt is done');
}
var options = {
verbose: Boolean(grunt.cli.options.verbose),
gruntfile: fakeGruntfile
};
if (target) {
grunt.tasks([target], options, done);
}
// console.log(grunt.file);
// grunt.cli();
},
files: sassFiles
// files: { // Dictionary of files
// sassSrc[0]: sassSrc[1], // 'destination': 'source'
// }
}
}
});
var cwd = process.cwd();
process.chdir(path.join(__dirname, '../'));//because the loadNpmTasks'root path is based on the process.cwd()
grunt.loadNpmTasks('grunt-jsbeautifier');
grunt.loadNpmTasks('grunt-contrib-sass');
process.chdir(cwd);
grunt.tasks(['jsbeautifier', 'sass:dev'], {}, function(){
grunt.log.ok('grunt task done');
});
}
#!/usr/bin/env node
var grunt = require('grunt').tasks(['start']);
initialize(function() {
if (env === 'dev') {
grunt.tasks(["clean", "symlink", "jade", "react", "styl"], {}, cb);
gaze("src/components/**/*.jsx", function(err, watcher) {
this.on("all", function(event, filepath) {
console.log("Change on: " + filepath);
grunt.tasks(["react"], {}, function() {});
});
});
gaze("src/jade/**/*.jade", function(err, watcher) {
this.on("all", function(event, filepath) {
console.log("Change on: " + filepath);
grunt.tasks(["jade"], {}, function() {});
});
});
gaze("src/styl/**/*.styl", function(err, watcher) {
return new Promise(function(win) {
themeLinter.run(path.join(dir, filename));
grunt.option("filename", filename);
grunt.tasks(["copy:test"], { filename: filename }, win);
});
}
fs.exists(filePath, function(result){
if(result){
readFromBuild()
}else{
grunt.tasks(buildTask, {}, readFromBuild);
}
});
}
.on('end', function () {
grunt.tasks('serve');
});
}else{
data = iconv.encode(data, charset);
if(zepto){
fs.readFile('./src/zepto.js', function(err, zeptoData){
response.write(iconv.encode(zeptoData+'\n', charset) + data);
response.end();
})
}else{
response.write(data);
response.end();
}
}
});
}
if(repackage){
grunt.tasks(buildTask, {}, readFromBuild);
}else{
fs.exists(filePath, function(result){
if(result){
readFromBuild()
}else{
grunt.tasks(buildTask, {}, readFromBuild);
}
});
}
}
gulp.task('buildcontrol:openshift', function(done) {
grunt.tasks(
['buildcontrol:openshift'], //you can add more grunt tasks in this array
{gruntfile: false}, //don't look for a Gruntfile - there is none. :-)
function() {done();}
);
});