2013-04-20 23:48:29 +00:00
|
|
|
module.exports = function (grunt) {
|
2013-03-22 23:39:08 +00:00
|
|
|
|
2013-04-20 23:48:29 +00:00
|
|
|
// Project configuration.
|
|
|
|
grunt.initConfig({
|
|
|
|
pkg: grunt.file.readJSON('package.json'),
|
2013-04-18 18:01:21 +00:00
|
|
|
|
2013-04-20 23:48:29 +00:00
|
|
|
curl: {
|
2013-05-08 05:47:15 +00:00
|
|
|
'UI/JsLibraries/backbone.js' : 'http://documentcloud.github.io/backbone/backbone.js',
|
2013-05-01 03:18:34 +00:00
|
|
|
'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-04-20 23:48:29 +00:00
|
|
|
//'UI/JsLibraries/bootstrap.js':
|
|
|
|
//'UI/JsLibraries/bootstrap.slider.js':
|
2013-05-01 03:18:34 +00:00
|
|
|
'UI/JsLibraries/handlebars.runtime.js' : 'http://raw.github.com/wycats/handlebars.js/master/dist/handlebars.runtime.js',
|
|
|
|
'UI/JsLibraries/jquery.cookie.js' : 'http://raw.github.com/carhartl/jquery-cookie/master/jquery.cookie.js',
|
|
|
|
'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-05-05 21:24:33 +00:00
|
|
|
|
|
|
|
'UI/JsLibraries/jquery.signalR.js' : 'https://raw.github.com/SignalR/SignalR/master/samples/Microsoft.AspNet.SignalR.Hosting.AspNet.Samples/Scripts/jquery.signalR.js',
|
|
|
|
|
2013-05-01 03:18:34 +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/underscore.js' : 'http://underscorejs.org/underscore.js',
|
|
|
|
'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',
|
2013-05-05 21:24:33 +00:00
|
|
|
'UI/JsLibraries/backbone.backgrid.filter.js' : 'http://raw.github.com/wyuenho/backgrid/master/lib/extensions/filter/backgrid-filter.js',
|
2013-05-01 03:18:34 +00:00
|
|
|
'UI/JsLibraries/messenger.js' : 'http://raw.github.com/HubSpot/messenger/master/build/js/messenger.js',
|
2013-05-03 05:31:51 +00:00
|
|
|
'UI/JsLibraries/lunr.js' : 'http://raw.github.com/olivernn/lunr.js/master/lunr.js',
|
2013-05-01 03:18:34 +00:00
|
|
|
'UI/Content/messenger.css' : 'http://raw.github.com/HubSpot/messenger/master/build/css/messenger.css',
|
|
|
|
'UI/Content/bootstrap.toggle-switch.css' : 'http://raw.github.com/ghinda/css-toggle-switch/gh-pages/toggle-switch.css',
|
2013-05-14 04:18:27 +00:00
|
|
|
'UI/Content/messenger.future.css' : 'http://raw.github.com/HubSpot/messenger/master/build/css/messenger-theme-future.css',
|
|
|
|
|
|
|
|
'UI/Content/FontAwesome/fontawesome.otf' : 'http://github.com/FortAwesome/Font-Awesome/blob/master/build/assets/font-awesome/font/FontAwesome.otf?raw=true',
|
|
|
|
'UI/Content/FontAwesome/fontawesome-webfont.eot' : 'https://github.com/FortAwesome/Font-Awesome/blob/master/build/assets/font-awesome/font/fontawesome-webfont.eot?raw=true',
|
|
|
|
'UI/Content/FontAwesome/fontawesome-webfont.svg' : 'https://github.com/FortAwesome/Font-Awesome/blob/master/build/assets/font-awesome/font/fontawesome-webfont.svg?raw=true',
|
|
|
|
'UI/Content/FontAwesome/fontawesome-webfont.ttf' : 'https://github.com/FortAwesome/Font-Awesome/blob/master/build/assets/font-awesome/font/fontawesome-webfont.ttf?raw=true',
|
|
|
|
'UI/Content/FontAwesome/fontawesome-webfont.woff': 'https://github.com/FortAwesome/Font-Awesome/blob/master/build/assets/font-awesome/font/fontawesome-webfont.woff?raw=true',
|
|
|
|
|
|
|
|
'UI/Content/FontAwesome/bootstrap.less' : 'https://raw.github.com/FortAwesome/Font-Awesome/master/build/assets/font-awesome/less/bootstrap.less',
|
|
|
|
'UI/Content/FontAwesome/core.less' : 'https://raw.github.com/FortAwesome/Font-Awesome/master/build/assets/font-awesome/less/core.less',
|
|
|
|
'UI/Content/FontAwesome/extras.less' : 'https://raw.github.com/FortAwesome/Font-Awesome/master/build/assets/font-awesome/less/extras.less',
|
|
|
|
'UI/Content/FontAwesome/font-awesome-ie7.less' : 'https://raw.github.com/FortAwesome/Font-Awesome/master/build/assets/font-awesome/less/font-awesome-ie7.less',
|
|
|
|
'UI/Content/FontAwesome/font-awesome.less' : 'https://raw.github.com/FortAwesome/Font-Awesome/master/build/assets/font-awesome/less/font-awesome.less',
|
|
|
|
'UI/Content/FontAwesome/icons.less' : 'https://raw.github.com/FortAwesome/Font-Awesome/master/build/assets/font-awesome/less/icons.less',
|
|
|
|
'UI/Content/FontAwesome/mixins.less' : 'https://raw.github.com/FortAwesome/Font-Awesome/master/build/assets/font-awesome/less/mixins.less',
|
|
|
|
'UI/Content/FontAwesome/path.less' : 'https://raw.github.com/FortAwesome/Font-Awesome/master/build/assets/font-awesome/less/path.less',
|
|
|
|
'UI/Content/FontAwesome/variables.less' : 'https://raw.github.com/FortAwesome/Font-Awesome/master/build/assets/font-awesome/less/variables.less'
|
2013-04-20 23:48:29 +00:00
|
|
|
},
|
2013-04-18 18:01:21 +00:00
|
|
|
|
2013-05-01 07:01:17 +00:00
|
|
|
clean: {
|
|
|
|
folder: "_output/UI/"
|
2013-04-20 23:48:29 +00:00
|
|
|
},
|
2013-05-01 07:01:17 +00:00
|
|
|
|
2013-04-20 23:48:29 +00:00
|
|
|
less : {
|
|
|
|
bootstrap: {
|
|
|
|
src : "UI/Content/bootstrap/bootstrap.less",
|
|
|
|
dest: "_output/UI/Content/bootstrap.css"
|
|
|
|
},
|
|
|
|
general : {
|
|
|
|
files: [
|
|
|
|
{
|
|
|
|
expand: true,
|
2013-05-14 04:18:27 +00:00
|
|
|
src : ['UI/**/*.less', '!**/Bootstrap/**','!**/FontAwesome/**'],
|
2013-04-20 23:48:29 +00:00
|
|
|
dest : '_output/',
|
|
|
|
ext : '.css'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2013-03-23 23:24:27 +00:00
|
|
|
|
2013-04-20 23:48:29 +00:00
|
|
|
handlebars: {
|
|
|
|
options: {
|
|
|
|
namespace : "Templates",
|
|
|
|
wrapped : true,
|
|
|
|
processName: function (fileName) {
|
|
|
|
return fileName
|
|
|
|
.replace('UI/', '')
|
|
|
|
.replace('.html', '')
|
|
|
|
.toLowerCase();
|
|
|
|
}
|
|
|
|
},
|
|
|
|
files : {
|
|
|
|
src : ['UI/**/*emplate.html'],
|
|
|
|
dest: '_output/UI/templates.js'
|
|
|
|
}
|
|
|
|
},
|
2013-03-23 23:24:27 +00:00
|
|
|
|
2013-04-20 23:48:29 +00:00
|
|
|
copy: {
|
|
|
|
index : {
|
|
|
|
src : 'UI/index.html',
|
|
|
|
dest: '_output/UI/index.html'
|
|
|
|
},
|
|
|
|
scripts: {
|
|
|
|
src : 'UI/**/*.js',
|
|
|
|
dest: '_output/'
|
|
|
|
},
|
|
|
|
styles : {
|
|
|
|
src : 'UI/**/*.css',
|
|
|
|
dest: '_output/'
|
|
|
|
},
|
|
|
|
images : {
|
|
|
|
src : 'UI/**/*.png',
|
|
|
|
dest: '_output/'
|
|
|
|
},
|
|
|
|
fonts : {
|
2013-05-14 04:18:27 +00:00
|
|
|
src : 'UI/**/FontAwesome/*.*',
|
2013-04-20 23:48:29 +00:00
|
|
|
dest: '_output/'
|
|
|
|
}
|
|
|
|
},
|
2013-03-29 01:49:14 +00:00
|
|
|
|
2013-04-20 23:48:29 +00:00
|
|
|
watch: {
|
|
|
|
bootstrap : {
|
2013-05-14 04:18:27 +00:00
|
|
|
files: ['<%= less.bootstrap.src %>', 'UI/**/FontAwesome/**'],
|
2013-04-20 23:48:29 +00:00
|
|
|
tasks: ['less:bootstrap']
|
|
|
|
},
|
|
|
|
generalLess: {
|
2013-05-14 04:18:27 +00:00
|
|
|
files: ['UI/**/*.less', '!**/Bootstrap/**', '!**/FontAwesome/**'],
|
2013-04-20 23:48:29 +00:00
|
|
|
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']
|
|
|
|
},
|
|
|
|
copyFonts : {
|
|
|
|
files: '<%= copy.fonts.src %>',
|
|
|
|
tasks: ['copy:fonts']
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
2013-03-22 23:39:08 +00:00
|
|
|
|
2013-04-20 23:48:29 +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');
|
2013-05-01 07:01:17 +00:00
|
|
|
grunt.loadNpmTasks('grunt-clean');
|
2013-04-20 23:48:29 +00:00
|
|
|
// Default task(s).
|
2013-05-01 07:01:17 +00:00
|
|
|
grunt.registerTask('package', ['clean', 'copy', 'less', 'handlebars']);
|
|
|
|
grunt.registerTask('default', ['package', 'watch']);
|
2013-04-20 23:48:29 +00:00
|
|
|
grunt.registerTask('update', ['curl']);
|
2013-03-22 23:39:08 +00:00
|
|
|
|
|
|
|
};
|