sonarr-repo-only/Gruntfile.js

195 lines
8.2 KiB
JavaScript
Raw Normal View History

module.exports = function (grunt) {
2013-03-22 23:39:08 +00:00
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
curl: {
2013-05-15 05:49:31 +00:00
'UI/JsLibraries/backbone.js' : 'http://documentcloud.github.io/backbone/backbone.js',
'UI/JsLibraries/backbone.marionette.js' : 'http://marionettejs.com/downloads/backbone.marionette.js',
'UI/JsLibraries/backbone.modelbinder.js' : 'http://raw.github.com/theironcook/Backbone.ModelBinder/master/Backbone.ModelBinder.js',
'UI/JsLibraries/backbone.mutators.js' : 'http://raw.github.com/asciidisco/Backbone.Mutators/master/backbone.mutators.js',
'UI/JsLibraries/backbone.shortcuts.js' : 'http://raw.github.com/bry4n/backbone-shortcuts/master/backbone.shortcuts.js',
2013-06-08 19:47:34 +00:00
2013-05-15 05:49:31 +00:00
'UI/JsLibraries/backbone.pageable.js' : 'http://raw.github.com/wyuenho/backbone-pageable/master/lib/backbone-pageable.js',
'UI/JsLibraries/backbone.backgrid.js' : 'http://raw.github.com/wyuenho/backgrid/master/lib/backgrid.js',
'UI/JsLibraries/backbone.backgrid.paginator.js' : 'http://raw.github.com/wyuenho/backgrid/master/lib/extensions/paginator/backgrid-paginator.js',
'UI/JsLibraries/backbone.backgrid.filter.js' : 'http://raw.github.com/wyuenho/backgrid/master/lib/extensions/filter/backgrid-filter.js',
'UI/JsLibraries/handlebars.runtime.js' : 'http://raw.github.com/wycats/handlebars.js/master/dist/handlebars.runtime.js',
2013-06-27 00:33:54 +00:00
'UI/JsLibraries/handlebars.helpers.js' : 'http://raw.github.com/danharper/Handlebars-Helpers/master/helpers.js',
2013-05-15 05:49:31 +00:00
'UI/JsLibraries/jquery.js' : 'http://code.jquery.com/jquery.js',
'UI/JsLibraries/jquery.backstretch.js' : 'http://raw.github.com/srobbin/jquery-backstretch/master/jquery.backstretch.js',
2013-06-26 05:44:36 +00:00
'UI/JsLibraries/jquery.signalR.js' : 'http://raw.github.com/SignalR/SignalR/master/samples/Microsoft.AspNet.SignalR.Hosting.AspNet.Samples/Scripts/jquery.signalR.js',
'UI/JsLibraries/jquery.knob.js' : 'http://raw.github.com/aterrien/jQuery-Knob/master/js/jquery.knob.js',
2013-05-15 05:49:31 +00:00
'UI/JsLibraries/require.js' : 'http://raw.github.com/jrburke/requirejs/master/require.js',
'UI/JsLibraries/sugar.js' : 'http://raw.github.com/andrewplummer/Sugar/master/release/sugar-full.development.js',
'UI/JsLibraries/lodash.underscore.js' : 'http://raw.github.com/bestiejs/lodash/master/dist/lodash.underscore.js',
2013-05-15 05:49:31 +00:00
'UI/JsLibraries/messenger.js' : 'http://raw.github.com/HubSpot/messenger/master/build/js/messenger.js',
'UI/Content/Messenger/messenger.css' : 'http://raw.github.com/HubSpot/messenger/master/build/css/messenger.css',
'UI/Content/Messenger/messenger.future.css' : 'http://raw.github.com/HubSpot/messenger/master/build/css/messenger-theme-future.css',
2013-06-26 05:42:44 +00:00
'UI/Content/bootstrap.toggle-switch.css' : 'http://raw.github.com/ghinda/css-toggle-switch/gh-pages/toggle-switch.css',
'UI/Content/prefixer.less' : 'http://raw.github.com/JoelSutherland/LESS-Prefixer/master/prefixer.less'
},
clean: {
folder: "_output/UI/"
},
less : {
2013-06-26 05:42:44 +00:00
options:{
dumpLineNumbers : 'false',
compress : false,
yuicompress : false,
ieCompat : false
},
bootstrap: {
src : "UI/Content/bootstrap/bootstrap.less",
dest: "_output/UI/Content/bootstrap.css"
},
general : {
files: [
{
expand: true,
2013-06-26 00:33:17 +00:00
src : [
'UI/Content/base.less',
2013-06-28 17:49:13 +00:00
'UI/Content/Overrides.less',
2013-06-26 00:33:17 +00:00
'UI/Series/Series.less',
'UI/AddSeries/addSeries.less',
'UI/Calendar/calendar.less',
'UI/Cells/cells.less',
2013-07-14 02:40:47 +00:00
'UI/Logs/logs.less',
2013-06-26 00:33:17 +00:00
'UI/Settings/settings.less',
],
dest : '_output/',
ext : '.css'
}
]
}
},
handlebars: {
options: {
2013-06-15 05:28:35 +00:00
namespace : "T",
partialRegex: /Partial.html/,
wrapped : true,
amd : true,
processName: function (fileName) {
return fileName
.replace('UI/', '')
.replace('.html', '')
.toLowerCase();
}
},
files : {
src : ['UI/**/*emplate.html','UI/**/*Partial.html'],
dest: '_output/UI/templates.js'
}
},
copy: {
index : {
2013-06-08 19:47:51 +00:00
src : 'UI/*ndex.html',
dest: '_output/'
},
scripts: {
src : 'UI/**/*.js',
dest: '_output/'
},
styles : {
src : 'UI/**/*.css',
dest: '_output/'
},
images : {
src : 'UI/**/*.png',
dest: '_output/'
},
jpg : {
src : 'UI/**/*.jpg',
dest: '_output/'
},
2013-07-06 22:46:11 +00:00
icon : {
src : 'UI/**/*.ico',
dest: '_output/'
},
2013-06-15 00:29:38 +00:00
fontAwesome : {
src : 'UI/**/FontAwesome/*.*',
dest: '_output/'
2013-06-15 00:29:38 +00:00
},
fonts : {
src : 'UI/**/fonts/*.*',
dest: '_output/'
}
},
2013-03-29 01:49:14 +00:00
watch: {
options: {
nospawn: false,
},
bootstrap : {
files: ['UI/**/Bootstrap/**', 'UI/**/FontAwesome/**'],
tasks: ['less:bootstrap','less:general']
},
generalLess: {
files: ['UI/**/*.less', '!**/Bootstrap/**', '!**/FontAwesome/**'],
tasks: ['less:general']
},
handlebars : {
files: '<%= handlebars.files.src %>',
tasks: ['handlebars']
},
copyIndex : {
files: '<%= copy.index.src %>',
tasks: ['copy:index']
},
copyScripts: {
files: '<%= copy.scripts.src %>',
tasks: ['copy:scripts']
},
copyStyles : {
files: '<%= copy.styles.src %>',
tasks: ['copy:styles']
},
copyImages : {
files: '<%= copy.images.src %>',
tasks: ['copy:images']
},
copyJpg : {
files: '<%= copy.jpg.src %>',
tasks: ['copy:jpg']
},
2013-07-06 22:46:11 +00:00
copyJpg : {
files: '<%= copy.icon.src %>',
tasks: ['copy:icon']
},
2013-06-15 00:29:38 +00:00
copyFontAwesome : {
files: '<%= copy.fontAwesome.src %>',
tasks: ['copy:fontAwesome']
},
copyFonts : {
files: '<%= copy.fonts.src %>',
tasks: ['copy:fonts']
}
}
});
2013-03-22 23:39:08 +00:00
grunt.loadNpmTasks('grunt-contrib-handlebars');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-notify');
grunt.loadNpmTasks('grunt-curl');
grunt.loadNpmTasks('grunt-clean');
// Default task(s).
grunt.registerTask('package', ['clean', 'copy', 'less', 'handlebars']);
grunt.registerTask('default', ['package', 'watch']);
grunt.registerTask('update', ['curl']);
2013-03-22 23:39:08 +00:00
2013-06-08 19:47:34 +00:00
};