Skip to content

Instantly share code, notes, and snippets.

@dansimco
Last active August 29, 2015 13:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dansimco/8780006 to your computer and use it in GitHub Desktop.
Save dansimco/8780006 to your computer and use it in GitHub Desktop.
Modularized Gruntfile
module.exports = function(grunt) {
//Load private config if available
try {
app_config = grunt.file.readJSON('config.json');
} catch (err) {
console.log(
"\n\nNo config file found. Some tasks may require config strings such as AWS keys or DB strings" +
"Please create one based on config.sample.json\n\n"
);
}
// Initialize package config.
grunt.initConfig({
pkg: require('./package.json'),
});
// Load per-task config from tasks folder.
grunt.loadTasks('tasks');
};
module.exports = function (grunt) {
var pkg = grunt.config.get('pkg');
grunt.config('concat', {
js: {
src: pkg.js,
dest: 'output/js.js',
},
sass: {
src: [
pkg.sass
],
dest: "temp/style.scss"
}
});
grunt.loadNpmTasks('grunt-contrib-concat');
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment