1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00
Sonarr/webpack.config.js

75 lines
2.4 KiB
JavaScript
Raw Normal View History

2015-02-04 01:33:40 +02:00
var path = require('path');
2015-02-04 02:56:18 +02:00
var stylish = require('jshint-stylish');
2015-02-08 03:01:15 +02:00
var webpack = require('webpack');
2015-07-22 04:42:38 +02:00
var phantom = require('./gulp/phantom');
2015-02-08 03:01:15 +02:00
var uglifyJsPlugin = new webpack.optimize.UglifyJsPlugin();
2015-02-04 01:33:40 +02:00
2015-07-22 04:42:38 +02:00
var uiFolder = 'UI';
if (phantom) {
uiFolder = 'UI.Phantom';
}
2015-02-03 03:18:45 +02:00
module.exports = {
2015-02-08 03:01:15 +02:00
entry: {
vendor: 'vendor.js',
main: 'main.js'
},
2015-07-22 04:42:38 +02:00
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/'
2015-02-03 03:18:45 +02:00
}
2015-02-04 02:56:18 +02:00
},
2015-07-22 04:42:38 +02:00
output: {
filename: '_output/' + uiFolder + '/[name].js',
sourceMapFilename: '_output/' + uiFolder + '/[name].map'
2015-02-04 02:56:18 +02:00
},
2015-07-22 04:42:38 +02:00
plugins: [
new webpack.optimize.CommonsChunkPlugin({ name: 'vendor' })
],
2015-02-04 02:56:18 +02:00
module: {
2015-07-22 04:42:38 +02: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 03:18:45 +02:00
};