Skip to content

Instantly share code, notes, and snippets.

@marcialca
Created July 26, 2013 07:00
Show Gist options
  • Save marcialca/6086855 to your computer and use it in GitHub Desktop.
Save marcialca/6086855 to your computer and use it in GitHub Desktop.
Jade Support for Yeoman
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