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