Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
options: {
lineNums: true
}
}
},
jshint: {
validate: {
src: ['src/**/*.js']
},
options: grunt.file.readJSON('.jshintrc')
},
});
// Load all grunt tasks in package.json
_.each(matchdep.filterAll('grunt-*'), function(pkgName){
grunt.loadNpmTasks(pkgName);
});
grunt.registerTask('test', ['clean:test', 'browserify', 'coffee:test', 'jasmine']);
grunt.registerTask('release', ['clean:dist', 'browserify', 'uglify']);
grunt.registerTask('default', ['jshint', 'test', 'release', 'docker']);
};
}
},
concurrent : {
options : {
logConcurrentOutput: true
},
watch : [
'watch',
'compass:watch'
]
}
});
require( 'matchdep' )
.filterAll( 'grunt-*', require( '../../package.json' ) )
.forEach( grunt.loadNpmTasks );
// grunt for distribution
grunt.registerTask( 'dist', [
'clean',
'copy',
'compass:clean',
'compass:dist'
]);
// grunt for development
grunt.registerTask( 'dev', [
'clean',
'copy',
module.exports = function(grunt) {
require("matchdep").filterAll("grunt-*").forEach(grunt.loadNpmTasks);
var webpack = require("webpack");
var webpackConfig = require("./webpack.config.js");
grunt.initConfig({
webpack: {
options: webpackConfig,
build: {
plugins: webpackConfig.plugins.concat(
new webpack.DefinePlugin({
"process.env": {
// This has effect on the react lib size
"NODE_ENV": JSON.stringify("production")
}
}),
new webpack.optimize.DedupePlugin(),
new webpack.optimize.UglifyJsPlugin()
)
}
},
options: {
stripBanners: true,
banner: '<%= banner %>',
// Allow for the original banner to be stripped
process: function(src, filepath) {
return filepath === 'currency.js' ? src.replace(/^\/\*!/, '/*') : src;
}
}
}
});
require('google-closure-compiler').grunt(grunt);
require('matchdep').filterAll('grunt-*').forEach(grunt.loadNpmTasks);
grunt.registerTask('build', ['closure-compiler', 'concat', 'sync']);
grunt.registerTask('default', ['build']);
};
lint._listPkgDependencies = function(options) {
var deps = matchdep.filterAll('*', pkgFile);
if (_.contains(deps, 'load-grunt-tasks') || _.contains(deps, 'matchdep')) {
excluded.packageNames = excluded.packageNames.concat(['grunt-']);
}
// Create a comma-separated list of deps to exclude from the search
var omissions = _.unique(excluded.packageNames).join(',');
var patterns = ['*', '!verb', '!{' + omissions + '}*'];
return matchdep.filterAll(patterns, pkgFile);
};
all: {
options: {
extends: '.pug-lintrc.json'
},
src: 'src/tmpl/**/*.pug'
}
},
htmllint: {
src: 'build/**/*.html'
}
});
grunt.loadTasks('tasks'); // getWiki, docs tasks
require('matchdep')
.filterAll(['grunt-*', '!grunt-docs'])
.forEach(grunt.loadNpmTasks);
grunt.registerTask('build', 'Build the site', [
'copy',
'docs',
'blog',
'plugins',
'uglify',
'sitemap'
]);
grunt.registerTask('default', 'Build the site, download plugins, production ready', [
'build',
'downloadPlugins',
'less:production',
'autoprefixer'
module.exports = function(grunt) {
require("matchdep").filterAll("grunt-*").forEach(grunt.loadNpmTasks);
grunt.loadTasks("tasks");
var webpack = require("webpack");
function buildTutorial(p, callback) {
p = path.resolve(p);
try {
var config = require(p + "/webpack.config.js");
} catch(e) { return callback(null, "") }
config.context = p;
webpack(config, function(err, stats) {
if(err) throw err;
grunt.log.writeln("webpack executed from " + path.basename(p));
grunt.log.writeln(stats.toString({
context: path.join(__dirname, "dist"),
chunks: false,
modules: true,
hash: false,
projectPackagesZed : {
files : '<%= dirs.project %>/<%= dirs.srcZ %>',
tasks : [
'copy:projectPackagesZed'
],
options : {
spawn : false
}
}
}
});
require( 'matchdep' )
.filterAll( 'grunt-*', require( '../../package.json' ) )
.forEach( grunt.loadNpmTasks );
grunt.registerTask( 'dev', [
'clean',
'copy'
]);
grunt.registerTask( 'watcher', [
'watcher'
]);
grunt.registerTask( 'dist', [
'dev'
]);
matchkeys.filter('*').map(function (keywords) {
matchdep.filterAll(keywords, pkg).forEach(function (match) {
registerHelper(match);
});
});
}
module.exports = function(grunt) {
var configs = require('load-grunt-configs')(grunt, {
config : {
src: "grunt/*.js"
}
});
grunt.initConfig(configs);
require("matchdep").filterAll("grunt-*").forEach(grunt.loadNpmTasks);
/**
* Default task to be used by developers. Startup webpack dev server
*/
grunt.registerTask('default', [
'webpack-dev-server:start',
]);
/**
* Runs all tests
*/
grunt.registerTask('test',[
'eslint',
'karma'
]);