parent
760469fc5f
commit
98acd0d886
@ -1,7 +1,7 @@
|
||||
module.exports = {
|
||||
onError:function (error) {
|
||||
onError : function(error) {
|
||||
//If you want details of the error in the console
|
||||
console.log(error.toString());
|
||||
this.emit('end');
|
||||
}
|
||||
}
|
||||
};
|
@ -1,45 +1,45 @@
|
||||
var phantom = require('./phantom');
|
||||
|
||||
var paths = {
|
||||
src: {
|
||||
root: './src/UI/',
|
||||
templates: './src/UI/**/*.hbs',
|
||||
html: './src/UI/*.html',
|
||||
partials: './src/UI/**/*Partial.hbs',
|
||||
scripts: './src/UI/**/*.js',
|
||||
less: ['./src/UI/**/*.less'],
|
||||
content: './src/UI/Content/',
|
||||
images: './src/UI/Content/Images/**/*',
|
||||
exclude: {
|
||||
libs: '!./src/UI/JsLibraries/**'
|
||||
src : {
|
||||
root : './src/UI/',
|
||||
templates : './src/UI/**/*.hbs',
|
||||
html : './src/UI/*.html',
|
||||
partials : './src/UI/**/*Partial.hbs',
|
||||
scripts : './src/UI/**/*.js',
|
||||
less : ['./src/UI/**/*.less'],
|
||||
content : './src/UI/Content/',
|
||||
images : './src/UI/Content/Images/**/*',
|
||||
exclude : {
|
||||
libs : '!./src/UI/JsLibraries/**'
|
||||
}
|
||||
},
|
||||
dest : {
|
||||
root : './_output/UI/',
|
||||
content : './_output/UI/Content/'
|
||||
}
|
||||
},
|
||||
dest: {
|
||||
root: './_output/UI/',
|
||||
content: './_output/UI/Content/'
|
||||
}
|
||||
};
|
||||
|
||||
if (phantom) {
|
||||
paths = {
|
||||
src: {
|
||||
root: './src/UI.Phantom/',
|
||||
templates: './src/UI.Phantom/**/*.hbs',
|
||||
html: './src/UI.Phantom/*.html',
|
||||
partials: './src/UI.Phantom/**/*Partial.hbs',
|
||||
scripts: './src/UI.Phantom/**/*.js',
|
||||
less: ['./src/UI.Phantom/**/*.less'],
|
||||
content: './src/UI.Phantom/Content/',
|
||||
images: './src/UI.Phantom/Content/Images/**/*',
|
||||
exclude: {
|
||||
libs: '!./src/UI.Phantom/JsLibraries/**'
|
||||
}
|
||||
},
|
||||
dest: {
|
||||
root: './_output/UI.Phantom/',
|
||||
content: './_output/UI.Phantom/Content/'
|
||||
}
|
||||
};
|
||||
paths = {
|
||||
src : {
|
||||
root : './src/UI.Phantom/',
|
||||
templates : './src/UI.Phantom/**/*.hbs',
|
||||
html : './src/UI.Phantom/*.html',
|
||||
partials : './src/UI.Phantom/**/*Partial.hbs',
|
||||
scripts : './src/UI.Phantom/**/*.js',
|
||||
less : ['./src/UI.Phantom/**/*.less'],
|
||||
content : './src/UI.Phantom/Content/',
|
||||
images : './src/UI.Phantom/Content/Images/**/*',
|
||||
exclude : {
|
||||
libs : '!./src/UI.Phantom/JsLibraries/**'
|
||||
}
|
||||
},
|
||||
dest : {
|
||||
root : './_output/UI.Phantom/',
|
||||
content : './_output/UI.Phantom/Content/'
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = paths;
|
||||
|
@ -1,67 +1,74 @@
|
||||
var path = require('path');
|
||||
var stylish = require('jshint-stylish');
|
||||
var webpack = require('webpack');
|
||||
var phantom = require('./gulp/phantom');
|
||||
|
||||
var uglifyJsPlugin = new webpack.optimize.UglifyJsPlugin();
|
||||
|
||||
var uiFolder = 'UI';
|
||||
|
||||
if (phantom) {
|
||||
uiFolder = 'UI.Phantom';
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
vendor: 'vendor.js',
|
||||
main: 'main.js'
|
||||
},
|
||||
resolve : {
|
||||
root : path.join(__dirname, 'src', 'UI'),
|
||||
alias : {
|
||||
'vent' : 'vent',
|
||||
'backbone' : 'Shims/backbone',
|
||||
'moment' : 'JsLibraries/moment',
|
||||
'filesize' : 'JsLibraries/filesize',
|
||||
'handlebars' : 'Shims/handlebars',
|
||||
'handlebars.helpers' : 'JsLibraries/handlebars.helpers',
|
||||
'bootstrap' : 'JsLibraries/bootstrap',
|
||||
'backbone.deepmodel' : 'JsLibraries/backbone.deep.model',
|
||||
'backbone.pageable' : 'JsLibraries/backbone.pageable',
|
||||
'backbone-pageable' : 'JsLibraries/backbone.pageable',
|
||||
'backbone.validation' : 'Shims/backbone.validation',
|
||||
'backbone.modelbinder' : 'JsLibraries/backbone.modelbinder',
|
||||
'backbone.collectionview' : 'Shims/backbone.collectionview',
|
||||
'backgrid' : 'Shims/backgrid',
|
||||
'backgrid.paginator' : 'Shims/backgrid.paginator',
|
||||
'backgrid.selectall' : 'Shims/backbone.backgrid.selectall',
|
||||
'fullcalendar' : 'JsLibraries/fullcalendar',
|
||||
'backstrech' : 'JsLibraries/jquery.backstretch',
|
||||
'underscore' : 'JsLibraries/lodash.underscore',
|
||||
'marionette' : 'Shims/backbone.marionette',
|
||||
'signalR' : 'Shims/jquery.signalR',
|
||||
'jquery-ui' : 'JsLibraries/jquery-ui',
|
||||
'jquery.knob' : 'JsLibraries/jquery.knob',
|
||||
'jquery.easypiechart' : 'JsLibraries/jquery.easypiechart',
|
||||
'jquery.dotdotdot' : 'JsLibraries/jquery.dotdotdot',
|
||||
'messenger' : 'Shims/messenger',
|
||||
'jquery' : 'Shims/jquery',
|
||||
'typeahead' : 'JsLibraries/typeahead',
|
||||
'zero.clipboard' : 'JsLibraries/zero.clipboard',
|
||||
'bootstrap.tagsinput' : 'JsLibraries/bootstrap.tagsinput',
|
||||
'libs' : 'JsLibraries/'
|
||||
resolve: {
|
||||
root: path.join(__dirname, 'src', uiFolder),
|
||||
alias: {
|
||||
'vent': 'vent',
|
||||
'backbone': 'Shims/backbone',
|
||||
'moment': 'JsLibraries/moment',
|
||||
'filesize': 'JsLibraries/filesize',
|
||||
'handlebars': 'Shims/handlebars',
|
||||
'handlebars.helpers': 'JsLibraries/handlebars.helpers',
|
||||
'bootstrap': 'JsLibraries/bootstrap',
|
||||
'backbone.deepmodel': 'JsLibraries/backbone.deep.model',
|
||||
'backbone.pageable': 'JsLibraries/backbone.pageable',
|
||||
'backbone-pageable': 'JsLibraries/backbone.pageable',
|
||||
'backbone.validation': 'Shims/backbone.validation',
|
||||
'backbone.modelbinder': 'JsLibraries/backbone.modelbinder',
|
||||
'backbone.collectionview': 'Shims/backbone.collectionview',
|
||||
'backgrid': 'Shims/backgrid',
|
||||
'backgrid.paginator': 'Shims/backgrid.paginator',
|
||||
'backgrid.selectall': 'Shims/backbone.backgrid.selectall',
|
||||
'fullcalendar': 'JsLibraries/fullcalendar',
|
||||
'backstrech': 'JsLibraries/jquery.backstretch',
|
||||
'underscore': 'JsLibraries/lodash.underscore',
|
||||
'marionette': 'Shims/backbone.marionette',
|
||||
'signalR': 'Shims/jquery.signalR',
|
||||
'jquery-ui': 'JsLibraries/jquery-ui',
|
||||
'jquery.knob': 'JsLibraries/jquery.knob',
|
||||
'jquery.easypiechart': 'JsLibraries/jquery.easypiechart',
|
||||
'jquery.dotdotdot': 'JsLibraries/jquery.dotdotdot',
|
||||
'messenger': 'Shims/messenger',
|
||||
'jquery': 'Shims/jquery',
|
||||
'typeahead': 'JsLibraries/typeahead',
|
||||
'zero.clipboard': 'JsLibraries/zero.clipboard',
|
||||
'bootstrap.tagsinput': 'JsLibraries/bootstrap.tagsinput',
|
||||
'libs': 'JsLibraries/'
|
||||
}
|
||||
},
|
||||
output : {
|
||||
filename : '_output/UI/[name].js',
|
||||
sourceMapFilename : '_output/UI/[name].map'
|
||||
output: {
|
||||
filename: '_output/' + uiFolder + '/[name].js',
|
||||
sourceMapFilename: '_output/' + uiFolder + '/[name].map'
|
||||
},
|
||||
plugins : [
|
||||
new webpack.optimize.CommonsChunkPlugin({name: 'vendor'})
|
||||
],
|
||||
plugins: [
|
||||
new webpack.optimize.CommonsChunkPlugin({ name: 'vendor' })
|
||||
],
|
||||
module: {
|
||||
|
||||
//this doesn't work yet. wainting for https://github.com/spenceralger/rcloader/issues/5
|
||||
/*preLoaders: [
|
||||
{
|
||||
test: /\.js$/, // include .js files
|
||||
loader: "jshint-loader",
|
||||
exclude: [/JsLibraries/,/node_modules/]
|
||||
}
|
||||
]
|
||||
*/
|
||||
}
|
||||
|
||||
//this doesn't work yet. wainting for https://github.com/spenceralger/rcloader/issues/5
|
||||
/*preLoaders: [
|
||||
{
|
||||
test: /\.js$/, // include .js files
|
||||
loader: "jshint-loader",
|
||||
exclude: [/JsLibraries/,/node_modules/]
|
||||
}
|
||||
]
|
||||
*/
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in new issue