Last active
August 29, 2015 13:55
-
-
Save dansimco/8780006 to your computer and use it in GitHub Desktop.
Modularized Gruntfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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