Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module.exports = function (grunt) {
- // Project configuration.
- grunt.initConfig({
- pkg: grunt.file.readJSON('package.json'),
- jade: {
- compile: {
- options: {
- data: {
- debug: true,
- timestamp: "<%= new Date().getTime() %>"
- }
- },
- files: [{
- expand: true,
- src: '**/*.jade',
- ext : '.html'
- }]
- }
- },
- uglify: {
- options: {
- banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
- },
- build: {
- src: 'Scripts/bootstrap.js',
- dest: 'Scripts/build/bootstrap.min.js'
- }
- },
- watch: {
- jade: {
- files: '**/*.jade',
- tasks: ['jade:watch'],
- options: {
- spawn: false
- }
- }
- }
- });
- grunt.event.on('watch', function (action, filepath) {
- if (filepath.indexOf('.jade') === -1) return;
- var file = {};
- var destfile = filepath.replace('.jade', '.html');
- file[destfile] = filepath
- grunt.config('jade.watch.files', file);
- });
- grunt.loadNpmTasks('grunt-contrib-watch');
- // Load the plugin that provides the "uglify" task.
- grunt.loadNpmTasks('grunt-contrib-uglify');
- grunt.loadNpmTasks('grunt-contrib-jade');
- // Default task(s).
- grunt.registerTask('default', ['uglify']);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement