Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
},
bgShell: {
compileDocumentation: {
cmd: 'cd ../Documentation/_make; make html',
bg: false
},
compileOmnigraffle: {
cmd: 'cd ../Documentation/IntegratorGuide; rm -Rf Diagrams/; osascript ../../Scripts/export_from_omnigraffle.scpt png `pwd`/IntegratorDiagrams.graffle `pwd`/Diagrams'
}
}
});
/**
* Load and register tasks
*/
require('matchdep').filter('grunt-*').forEach(grunt.loadNpmTasks);
// Empty task
grunt.registerTask('_empty', function () {});
/**
* Build commands for execution in the build pipeline
*/
grunt.registerTask('build', ['build-js', 'build-css']);
grunt.registerTask('build-js', ['compile-js', 'requirejs:compile']);
grunt.registerTask('build-css', ['compile-css', 'concat:css']);
grunt.registerTask('build-docs', ['bgShell:compileOmnigraffle', 'bgShell:compileDocumentation']);
/**
* Compile commands for development context
*/
grunt.registerTask('compile', ['compile-js', 'compile-css']);
module.exports = function (grunt) {
var matchdep = require('matchdep'),
commonTasks
matchdep.filter('grunt-*').forEach(grunt.loadNpmTasks)
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
clean: {
all: [
'webroot/static',
'webroot/views',
],
},
compress: {
all: {
options: {
mode: 'gzip',
},
files: [{
resolve.load = function(patterns, config) {
return matchdep.filter(patterns, config).map(function(pattern) {
return resolve.filepath(pattern);
});
};
module.exports = function(grunt){
require("matchdep").filterDev("grunt-*").forEach(grunt.loadNpmTasks);
require("matchdep").filter("grunt-*").forEach(grunt.loadNpmTasks);
grunt.initConfig({
'copy': {
'main': {
files: [
{expand: true, src: ['*.html'], flatten:true, dest:'public'}
]
},
'build_appjs': {
files: [{
src: ['app/**/*.js'],
dest: 'public',
expand: true
}]
}
},
flatten: true,
cwd: 'src/coffee',
src: ['*.coffee'],
dest: 'build/js',
ext: '.js'
}
},
browserify : {
vendor: {
src: ['src/bin/js/app.js'],
dest: 'src/bin/js/vendor.js'
}
}
});
require('matchdep').filter('grunt-*').forEach(grunt.loadNpmTasks);
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
grunt.registerTask('compile', ['less','coffee']);
grunt.registerTask('build', [ 'clean', 'copy:deps','browserify','copy:assets','mkdir:assets','compile']);
grunt.registerTask('default', [ 'build' ]);
grunt.registerTask('serve', [ 'server' ]);
};
module.exports = function (grunt) {
var matchdep = require('matchdep'),
jsFiles,
stylFiles,
jadeFiles
matchdep.filter('grunt-*').forEach(grunt.loadNpmTasks)
jsFiles = {
'webroot/static/js/main.js': [
'app/assets/js/utils.js',
'app/assets/js/main.js',
],
}
stylFiles = [{
'webroot/static/css/main.css': [
'app/assets/styl/main.styl',
],
}]
jadeFiles = [{
expand: true,
cwd: 'app/views',
src: '**/*.jade',
target: {
files: [{
expand: true,
cwd: path.join(packagePath, 'Resources/Public/Styles'),
src: ['*.css', '!*.min.css'],
dest: path.join(packagePath, 'Resources/Public/Styles'),
ext: '.min.css'
}]
}
}
});
/**
* Load and register tasks
*/
require('matchdep').filter('grunt-*').forEach(grunt.loadNpmTasks);
/**
* Build commands for execution in the build pipeline
*/
grunt.registerTask('build', ['compass', 'cssmin']);
grunt.registerTask('build:css', ['build']);
};