Created
December 27, 2013 17:01
-
-
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).
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) { | |
'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