Created
July 26, 2013 07:00
-
-
Save marcialca/6086855 to your computer and use it in GitHub Desktop.
Jade Support for Yeoman
This file contains hidden or 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
Install grunt-contrib-jade | |
(sudo) npm install grunt-contrib-jade --save-dev | |
Create the JADE Task: | |
jade: { | |
dist: { | |
options: { | |
pretty: true | |
}, | |
files: [{ | |
expand: true, | |
cwd: '<%= yeoman.app %>', | |
dest: '<%= yeoman.app %>', //Keep the dest in the same place | |
src: ['**/*.jade'], //This holds the folder structure | |
ext: '.html' | |
}] | |
} | |
}, | |
Add to the watch task: | |
jade: { | |
files: ['<%= yeoman.app %>/{,*/}*.jade'], | |
tasks: ['jade'] | |
}, | |
Add it to the other grunt tasks at the end | |
grunt.task.run([ | |
'clean:server', | |
'jade', | |
'concurrent:server', | |
'connect:livereload', | |
'open', | |
'watch' | |
]); | |
}); | |
grunt.registerTask('build', [ | |
'clean:dist', | |
'jade', | |
'useminPrepare', | |
'concurrent:dist', | |
'concat', | |
'copy', | |
'cdnify', | |
'ngmin', | |
'cssmin', | |
'uglify', | |
'rev', | |
'usemin' | |
]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment