Created
February 27, 2014 12:11
-
-
Save genoma/9248932 to your computer and use it in GitHub Desktop.
Grunt configuration for Foundation 5 with coffeescript and grunt-newer
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) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
coffee: { | |
compileJoined: { | |
options: { | |
join: true | |
}, | |
files: { | |
'js/app.js': ['coffeescripts/app.coffee', 'coffeescripts/*.coffee'] | |
} | |
}, | |
glob_to_multiple: { | |
expand: true, | |
flatten: true, | |
cwd: 'p_coffeescripts', | |
src: ['*.coffee'], | |
dest: 'js/plugins/', | |
ext: '.js' | |
} | |
}, | |
sass: { | |
options: { | |
includePaths: ['bower_components/foundation/scss'] | |
}, | |
dist: { | |
options: { | |
outputStyle: 'compressed' | |
}, | |
files: { | |
'css/app.css': 'scss/app.scss' | |
} | |
} | |
}, | |
watch: { | |
grunt: { files: ['Gruntfile.js'] }, | |
sass: { | |
files: 'scss/**/*.scss', | |
tasks: ['sass'] | |
}, | |
coffee: { | |
options: { | |
livereload: true | |
}, | |
files: ['coffeescripts/*.*', 'p_coffeescripts/*.*'], | |
tasks: ['coffee'] | |
}, | |
html: { | |
options: { | |
livereload: true | |
}, | |
files: ['*.html'] | |
} | |
} | |
}); | |
grunt.loadNpmTasks('grunt-contrib-coffee'); | |
grunt.loadNpmTasks('grunt-sass'); | |
grunt.loadNpmTasks('grunt-contrib-watch'); | |
grunt.loadNpmTasks('grunt-newer'); | |
grunt.registerTask('build', ['newer:sass', 'newer:coffee']); | |
grunt.registerTask('default', ['build','watch']); | |
} |
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
{ | |
"name": "foundation-libsass-template", | |
"version": "0.0.1", | |
"devDependencies": { | |
"node-sass": "~0.7.0", | |
"grunt": "~0.4.1", | |
"grunt-contrib-watch": "^0.5.3", | |
"grunt-sass": "~0.8.0", | |
"grunt-contrib-coffee": "^0.10.1", | |
"grunt-newer": "^0.6.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment