mirror of https://github.com/fspc/workstand.git
Browse Source
* Load webpack only in debug. * Second stab at buildfile. * Move button. * Add new line. * Linting. * Spelling mistake. * Clean up. * Use babel-polyfill. * Updated Configuration Files for Fresh Installfeature/python-error-tracking
Drew Larson
8 years ago
committed by
GitHub
25 changed files with 122 additions and 117 deletions
@ -0,0 +1,2 @@ |
|||||
|
[flake8] |
||||
|
max-line-length = 120 |
@ -1,3 +1 @@ |
|||||
from django.test import TestCase |
|
||||
|
|
||||
# Create your tests here. |
# Create your tests here. |
||||
|
@ -1,38 +1,35 @@ |
|||||
var path = require("path") |
const path = require('path'); |
||||
var webpack = require('webpack') |
|
||||
var BundleTracker = require('webpack-bundle-tracker') |
|
||||
|
|
||||
const autoprefixer = require('autoprefixer'); |
const autoprefixer = require('autoprefixer'); |
||||
|
require('babel-polyfill'); |
||||
|
|
||||
module.exports = { |
module.exports = { |
||||
context: __dirname, |
context: __dirname, |
||||
|
|
||||
|
entry: { |
||||
|
signin: './assets/js/index', |
||||
|
members: './assets/js/members/index', |
||||
|
babelPolyfill: 'babel-polyfill', |
||||
|
}, |
||||
|
|
||||
entry: { |
output: { |
||||
signin: './assets/js/index', |
path: path.resolve('./assets/bundles/'), |
||||
members: './assets/js/members/index', |
filename: '[name]-[hash].js', |
||||
}, |
}, |
||||
|
|
||||
output: { |
plugins: [ |
||||
path: path.resolve('./assets/bundles/'), |
|
||||
filename: "[name]-[hash].js" |
|
||||
}, |
|
||||
|
|
||||
plugins: [ |
], // add all common plugins here
|
||||
|
|
||||
], // add all common plugins here
|
|
||||
|
|
||||
module: { |
module: { |
||||
loaders: [ |
loaders: [], |
||||
|
}, |
||||
] |
|
||||
}, |
|
||||
|
|
||||
resolve: { |
resolve: { |
||||
modulesDirectories: [ |
modulesDirectories: [ |
||||
'node_modules', |
'node_modules', |
||||
'bower_components' |
'bower_components', |
||||
], |
], |
||||
extensions: ['', '.js', '.jsx', '.scss'] |
extensions: ['', '.js', '.jsx', '.scss'], |
||||
}, |
}, |
||||
postcss: [autoprefixer] |
postcss: [autoprefixer], |
||||
} |
}; |
||||
|
@ -1,45 +1,47 @@ |
|||||
var path = require("path") |
const webpack = require('webpack'); |
||||
var webpack = require('webpack') |
const BundleTracker = require('webpack-bundle-tracker'); |
||||
var BundleTracker = require('webpack-bundle-tracker') |
|
||||
const ExtractTextPlugin = require('extract-text-webpack-plugin'); |
const ExtractTextPlugin = require('extract-text-webpack-plugin'); |
||||
|
require('babel-polyfill'); |
||||
|
|
||||
var config = require('./webpack.base.config.js') |
|
||||
|
const config = require('./webpack.base.config.js'); |
||||
|
|
||||
// Use webpack dev server
|
// Use webpack dev server
|
||||
config.entry = { |
config.entry = { |
||||
webpack: [ |
webpack: [ |
||||
'webpack-dev-server/client?http://webpack.docker:3000', |
'webpack-dev-server/client?http://localhost:3000', |
||||
'webpack/hot/only-dev-server', |
'webpack/hot/only-dev-server', |
||||
], |
], |
||||
signin: './assets/js/index', |
signin: './assets/js/index', |
||||
members: './assets/js/members/index', |
members: './assets/js/members/index', |
||||
} |
babelPolyfill: 'babel-polyfill', |
||||
|
}; |
||||
|
|
||||
// override django's STATIC_URL for webpack bundles
|
// override django's STATIC_URL for webpack bundles
|
||||
config.output.publicPath = 'http://webpack.docker:3000/assets/bundles/' |
config.output.publicPath = 'http://localhost:3000/assets/bundles/'; |
||||
|
|
||||
config.devtool = 'eval-source-map'; |
config.devtool = 'eval-source-map'; |
||||
|
|
||||
// Add HotModuleReplacementPlugin and BundleTracker plugins
|
// Add HotModuleReplacementPlugin and BundleTracker plugins
|
||||
config.plugins = config.plugins.concat([ |
config.plugins = config.plugins.concat([ |
||||
new webpack.HotModuleReplacementPlugin(), |
new webpack.HotModuleReplacementPlugin(), |
||||
new webpack.NoErrorsPlugin(), |
new webpack.NoErrorsPlugin(), |
||||
new BundleTracker({filename: './webpack-stats.json'}), |
new BundleTracker({ filename: './webpack-stats.json' }), |
||||
new ExtractTextPlugin('react-toolbox.css', {allChunks: true}), |
new ExtractTextPlugin('react-toolbox.css', { allChunks: true }), |
||||
]) |
]); |
||||
|
|
||||
// Add a loader for JSX files with react-hot enabled
|
// Add a loader for JSX files with react-hot enabled
|
||||
config.module.loaders.push( |
config.module.loaders.push( |
||||
{ |
{ |
||||
test: /\.jsx?$/, |
test: /\.jsx?$/, |
||||
exclude: /node_modules/, |
exclude: /node_modules/, |
||||
loaders: ['react-hot','babel-loader'] |
loaders: ['react-hot', 'babel-loader'], |
||||
|
|
||||
}, |
}, |
||||
{ |
{ |
||||
test: /(\.scss|\.css)$/, |
test: /(\.scss|\.css)$/, |
||||
loader: ExtractTextPlugin.extract('style', 'css?sourceMap&modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!postcss!sass?sourceMap!toolbox') |
loader: ExtractTextPlugin.extract('style', 'css?sourceMap&modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!postcss!sass?sourceMap!toolbox'), |
||||
} |
} |
||||
) |
); |
||||
|
|
||||
module.exports = config |
module.exports = config; |
||||
|
Loading…
Reference in new issue