Skip to content

Instantly share code, notes, and snippets.

@ebsen
Created December 27, 2013 17:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ebsen/8149650 to your computer and use it in GitHub Desktop.
Save ebsen/8149650 to your computer and use it in GitHub Desktop.
This is the grunt file referred to in [Issue #265 in gruntjs/grunt-contrib-watch](https://github.com/gruntjs/grunt-contrib-watch/issues/265).
module.exports = function(grunt) {
'use strict';
require("matchdep").filterDev("grunt-*").forEach(grunt.loadNpmTasks);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
watch: {
styles: {
files: ['*.styl'],
tasks: ['stylus']
},
jade: {
files: ['*.jade'],
tasks: ['jade']
}//,
// html: {
// files: ['build/index.html'],
// tasks: ['htmlhint']
// }
},
stylus: {
compile: {
options: {
compress: false
},
files: {
'build/styles/production.css': 'styles/development.styl'
}
}
},
jade: {
compile: {
options: {
pretty: true,
// var manifest = grunt.readJSON('songs/manifest.json'),
// data: 'songs/manifest.songs'
// data: 'songs.js'
data: function(dest, src) {
// Return an object of data to pass to templates
// return require('songs.json');
// return require('songs.json');
return grunt.file.readJSON('songs.json');
}
},
files: {
'build/index.html': ['views/layout.jade', 'views/content.jade']
}
}
},
htmlhint: {
}
//jade (use data to pass songs.{js|json}), stylus (with nib), cssmin, linters
});
grunt.registerTask('default', ['stylus', 'jade']);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment