@@ -22,6 +22,7 @@ globals:
|
||||
|
||||
parserOptions:
|
||||
ecmaVersion: 6
|
||||
sourceType: "module"
|
||||
|
||||
rules:
|
||||
curly: error
|
||||
|
||||
@@ -49,10 +49,10 @@ import md from 'angular-markdown-it';
|
||||
import nganimate from 'angular-animate';
|
||||
|
||||
var app = angular.module('Deck', [
|
||||
ngsanitize,
|
||||
uirouter,
|
||||
angularuiselect,
|
||||
ngsortable, md, nganimate
|
||||
ngsanitize,
|
||||
uirouter,
|
||||
angularuiselect,
|
||||
ngsortable, md, nganimate
|
||||
]);
|
||||
|
||||
export default app;
|
||||
|
||||
@@ -13,13 +13,13 @@ import './app/Run.js';
|
||||
|
||||
|
||||
import ListController from 'controller/ListController.js';
|
||||
app.controller('ListController', ListController)
|
||||
app.controller('ListController', ListController);
|
||||
|
||||
|
||||
// require all the js files from subdirectories
|
||||
var context = require.context(".", true, /(controller|service|filters|directive)\/(.*)\.js$/);
|
||||
|
||||
context.keys().forEach(function (key) {
|
||||
context(key);
|
||||
context(key);
|
||||
});
|
||||
|
||||
|
||||
@@ -3,52 +3,52 @@ const webpack = require('webpack');
|
||||
const ExtractTextPlugin = require("extract-text-webpack-plugin");
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
deck: './init.js',
|
||||
},
|
||||
output: {
|
||||
filename: '[name].js',
|
||||
path: __dirname + '/build'
|
||||
},
|
||||
resolve: {
|
||||
modules: [path.resolve(__dirname), 'node_modules'],
|
||||
},
|
||||
module: {
|
||||
loaders: [
|
||||
{
|
||||
test: /\.js$/,
|
||||
exclude: /node_modules/,
|
||||
loader: 'babel-loader',
|
||||
},
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: ExtractTextPlugin.extract({
|
||||
use: {
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
minimize: true,
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
test: /(vendor\.js)+/i,
|
||||
}),
|
||||
// we do not uglify deck.js since there are no proper dependency annotations
|
||||
new webpack.optimize.CommonsChunkPlugin({
|
||||
name: 'vendor',
|
||||
filename: 'vendor.js',
|
||||
minChunks(module, count) {
|
||||
var context = module.context;
|
||||
return context && context.indexOf('node_modules') >= 0;
|
||||
},
|
||||
}),
|
||||
new ExtractTextPlugin({
|
||||
filename: "../../css/vendor.css",
|
||||
allChunks: true
|
||||
}),
|
||||
]
|
||||
entry: {
|
||||
deck: './init.js',
|
||||
},
|
||||
output: {
|
||||
filename: '[name].js',
|
||||
path: __dirname + '/build'
|
||||
},
|
||||
resolve: {
|
||||
modules: [path.resolve(__dirname), 'node_modules'],
|
||||
},
|
||||
module: {
|
||||
loaders: [
|
||||
{
|
||||
test: /\.js$/,
|
||||
exclude: /node_modules/,
|
||||
loader: 'babel-loader',
|
||||
},
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: ExtractTextPlugin.extract({
|
||||
use: {
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
minimize: true,
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
test: /(vendor\.js)+/i,
|
||||
}),
|
||||
// we do not uglify deck.js since there are no proper dependency annotations
|
||||
new webpack.optimize.CommonsChunkPlugin({
|
||||
name: 'vendor',
|
||||
filename: 'vendor.js',
|
||||
minChunks(module, count) {
|
||||
var context = module.context;
|
||||
return context && context.indexOf('node_modules') >= 0;
|
||||
},
|
||||
}),
|
||||
new ExtractTextPlugin({
|
||||
filename: "../../css/vendor.css",
|
||||
allChunks: true
|
||||
}),
|
||||
]
|
||||
};
|
||||
|
||||
@@ -12,6 +12,7 @@ find -name "*.js" -path '*js/*' -not -path '*js/node_modules*' \
|
||||
-not -path '*l10n/*' \
|
||||
-not -path '*js/vendor*' \
|
||||
-not -path '*js/tests*' \
|
||||
-not -path '*js/webpack*' \
|
||||
-not -path '*js/public*' \
|
||||
-not -path '*build/*' \
|
||||
-not -path '*tests/*' \
|
||||
|
||||
Reference in New Issue
Block a user