mirror of
https://github.com/nextcloud/passman.git
synced 2024-11-10 09:13:00 +08:00
47 lines
No EOL
1,012 B
JavaScript
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']);
|
|
|
|
}; |