sonarr-repo-only/webpack.config.js

79 lines
2.6 KiB
JavaScript
Raw Normal View History

2015-02-03 23:33:40 +00:00
var path = require('path');
2015-02-04 00:56:18 +00:00
var stylish = require('jshint-stylish');
2015-02-08 01:01:15 +00:00
var webpack = require('webpack');
2015-07-22 02:42:38 +00:00
var phantom = require('./gulp/phantom');
2015-02-08 01:01:15 +00:00
var uglifyJsPlugin = new webpack.optimize.UglifyJsPlugin();
2015-02-03 23:33:40 +00:00
2015-07-22 02:42:38 +00:00
var uiFolder = 'UI';
2015-08-09 19:02:18 +00:00
var root = path.join(__dirname, 'src', uiFolder);
2015-07-22 02:42:38 +00:00
if (phantom) {
uiFolder = 'UI.Phantom';
2015-08-09 19:02:18 +00:00
root = path.join(__dirname, uiFolder);
2015-07-22 02:42:38 +00:00
}
2015-02-03 01:18:45 +00:00
module.exports = {
2015-02-08 01:01:15 +00:00
entry: {
vendor: 'vendor.js',
main: 'main.js'
},
2015-07-22 02:42:38 +00:00
resolve: {
2015-08-09 19:02:18 +00:00
root: root,
2015-07-22 02:42:38 +00:00
alias: {
'vent': 'vent',
'backbone': 'Shims/backbone',
'moment': 'JsLibraries/moment',
'filesize': 'JsLibraries/filesize',
'handlebars': 'Shims/handlebars',
'handlebars.helpers': 'JsLibraries/handlebars.helpers',
'bootstrap': 'JsLibraries/bootstrap',
2015-07-28 05:56:44 +00:00
'backbone.deepmodel': 'Shims/backbone.deep.model',
2015-07-22 02:42:38 +00:00
'backbone.pageable': 'JsLibraries/backbone.pageable',
'backbone-pageable': 'JsLibraries/backbone.pageable',
2015-07-28 05:34:44 +00:00
'backbone.paginator': 'JsLibraries/backbone.paginator',
2015-07-22 02:42:38 +00:00
'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',
2015-07-28 05:34:44 +00:00
'underscore': 'Shims/underscore',
2015-07-22 02:42:38 +00:00
'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',
2015-08-16 01:07:31 +00:00
'jquery.lazyload': 'JsLibraries/jquery.lazyload',
2015-07-22 02:42:38 +00:00
'messenger': 'Shims/messenger',
'jquery': 'Shims/jquery',
'typeahead': 'JsLibraries/typeahead',
'zero.clipboard': 'JsLibraries/zero.clipboard',
'bootstrap.tagsinput': 'JsLibraries/bootstrap.tagsinput',
'libs': 'JsLibraries/'
2015-02-03 01:18:45 +00:00
}
2015-02-04 00:56:18 +00:00
},
2015-07-22 02:42:38 +00:00
output: {
filename: '_output/' + uiFolder + '/[name].js',
sourceMapFilename: '_output/' + uiFolder + '/[name].map'
2015-02-04 00:56:18 +00:00
},
2015-07-22 02:42:38 +00:00
plugins: [
new webpack.optimize.CommonsChunkPlugin({ name: 'vendor' })
],
2015-02-04 00:56:18 +00:00
module: {
2015-07-22 02:42:38 +00:00
//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/]
}
]
*/
}
2015-02-03 01:18:45 +00:00
};