1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-04 10:02:40 +01:00
Radarr/Gruntfile.js

106 lines
2.6 KiB
JavaScript
Raw Normal View History

2013-03-23 00:39:08 +01:00
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
files: {
expand: true, // Enable dynamic expansion.
cwd: 'UI/', // Src matches are relative to this path.
src: ['**/*.js'], // Actual pattern(s) to match.
dest: 'build/', // Destination path prefix.
2013-03-24 01:14:55 +01:00
ext: '.min.js'
}
},
less:{
bootstrap:{
src: ["UI/Content/bootstrap/bootstrap.less"],
2013-03-29 02:49:14 +01:00
dest: "_output/UI/Content/bootstrap.css"
2013-03-23 00:39:08 +01:00
}
},
2013-03-23 00:39:08 +01:00
handlebars: {
options: {
namespace: "Templates",
processName: function(fileName){
return fileName
.replace('UI/','')
.replace('.html','')
.toLowerCase();
}
2013-03-23 00:39:08 +01:00
},
files: {
src: ['UI/**/*emplate.html'],
2013-03-29 02:49:14 +01:00
dest: '_output/UI/templates.js'
},
},
2013-03-29 02:49:14 +01:00
copy:{
index:{
src: 'UI/index.html',
2013-03-29 02:49:14 +01:00
dest: '_output/UI/index.html'
},
scripts:{
src: 'UI/**/*.js',
dest: '_output/'
2013-03-29 02:49:14 +01:00
},
styles:{
src: 'UI/**/*.css',
dest: '_output/'
2013-03-29 02:49:14 +01:00
},
images:{
src: 'UI/**/*.png',
dest: '_output/'
2013-03-29 02:49:14 +01:00
},
fonts:{
src: 'UI/**/Fonts/*.*',
dest: '_output/',
2013-03-29 02:49:14 +01:00
}
},
watch:{
bootstrap:{
2013-03-29 02:49:14 +01:00
files: 'NzbDrone.Backbone/Content/bootstrap/*.less',
tasks: ['less:bootstrap']
},
handlebars:{
files: '<%= handlebars.files.src %>',
tasks: ['handlebars']
2013-03-29 02:49:14 +01:00
},
copyIndex:{
files: '<%= copy.index.src %>',
tasks: ['copy:index']
},
copyScripts:{
files: '<%= copy.scripts.src %>',
2013-03-29 02:49:14 +01:00
tasks: ['copy:scripts']
},
copyStyles:{
files: '<%= copy.styles.src %>',
2013-03-29 02:49:14 +01:00
tasks: ['copy:styles']
},
copyImages:{
files: '<%= copy.images.src %>',
2013-03-29 02:49:14 +01:00
tasks: ['copy:images']
},
copyFonts:{
files: '<%= copy.fonts.src %>',
tasks: ['copy:fonts']
2013-03-23 00:39:08 +01:00
}
}
});
2013-03-23 00:39:08 +01:00
// Load the plugin that provides the "uglify" task.
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-handlebars');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-concat');
2013-03-29 02:49:14 +01:00
grunt.loadNpmTasks('grunt-contrib-copy');
2013-03-29 20:17:03 +01:00
grunt.loadNpmTasks('grunt-wrap');
2013-04-12 06:39:29 +02:00
grunt.loadNpmTasks('grunt-notify');
2013-03-23 00:39:08 +01:00
// Default task(s).
2013-03-29 02:49:14 +01:00
grunt.registerTask('default', ['copy','less:bootstrap','handlebars', 'watch']);
2013-03-23 00:39:08 +01:00
};