Last active
December 14, 2015 18:28
-
-
Save davidvanleeuwen/5129286 to your computer and use it in GitHub Desktop.
Create the 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
grunt.initConfig | |
coffee: | |
scripts: | |
files: | |
grunt.file.expandMapping(['src/scripts/**/*.coffee'], 'blog/scripts/', | |
rename: (destBase, destPath) -> | |
return destBase + destPath.slice(12, destPath.length) | |
.replace(/\.coffee$/, '.js') | |
) | |
main: | |
files: | |
'blog/scripts/main.js': 'src/main.coffee' | |
sass: | |
options: | |
compass: true | |
style: 'compressed' | |
compile: | |
files: | |
'blog/stylesheets/main.css': 'src/stylesheets/main.sass' | |
haml: | |
templates: | |
compile: | |
options: | |
language: 'coffee' | |
namespace: 'JST' | |
target: 'js' | |
files: | |
grunt.file.expandMapping(['src/templates/**/*.haml'], | |
'blog/scripts/templates/', | |
rename: (destBase, destPath) -> | |
return destBase + destPath.slice(13, destPath.length) | |
.replace(/\.haml$/, '.js') | |
) | |
index: | |
compile: | |
options: | |
target: 'html' | |
files: | |
'blog/index.html': 'src/index.haml' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment