passman/Gruntfile.js
2016-09-10 13:29:23 +02:00

47 lines
No EOL
1,012 B
JavaScript

module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
html2js: {
options: {
// custom options, see below
base: 'templates'
},
main: {
src: ['templates/views/**/*.html'],
dest: 'js/templates.js'
}
},
//@TODO JSHint, comile sass
watch: {
scripts: {
files: ['Gruntfile.js', 'views/*.html'],
tasks: ['html2js'],
options: {
spawn: false,
interrupt: true,
reload: true
}
}
},
// uglify: {
// options: {
// banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
// },
// build: {
// src: 'src/<%= pkg.name %>.js',
// dest: 'build/<%= pkg.name %>.min.js'
// }
// }
});
// Load the plugin that provides the "uglify" task.
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-html2js');
grunt.loadNpmTasks('grunt-contrib-watch');
// Default task(s).
grunt.registerTask('default', ['html2js']);
};