update development bundle

This commit is contained in:
Eric Hulburd
2016-02-22 20:02:45 -06:00
parent b8d0a9434b
commit a0cda06672
40 changed files with 356 additions and 92 deletions

View File

@@ -0,0 +1,3 @@
import app from './../../app';
app();

View File

@@ -0,0 +1,10 @@
// Vendor Stylesheets
require('bootstrap/dist/css/bootstrap.min.css');
require(__dirname + '/../../d3/chart.scss');
// Component Stylesheets
require(__dirname + '/../../app.scss');
// TODO: iterate through directories, instead of explicit requires.
require(__dirname + '/../../dashboard/layout/layout.scss');
require(__dirname + '/../../dashboard/energy/energy.scss');
require(__dirname + '/../../dashboard/power/power.scss');

View File

@@ -0,0 +1,22 @@
// All react templates should be pre-compiled for development.
// run 'gulp compile_react_templates'
import layoutRt from './../../dashboard/layout/layout.rt.js';
import energyRt from './../../dashboard/energy/energy.rt.js';
import powerRt from './../../dashboard/power/power.rt.js';
const TEMPLATES = Object.freeze({
layout: layoutRt,
energy: energyRt,
power: powerRt,
});
class Templates {
static forComponent(view){
return TEMPLATES[view];
}
}
export default Templates;

View File

@@ -0,0 +1,52 @@
import webpack from 'webpack';
const CLIENT = __dirname + '/../..';
const ROOT = CLIENT + '/..';
module.exports = {
entry: {
app: CLIENT + '/config/development/app',
style: CLIENT + '/config/development/style'
},
output: {
filename: '[name].js',
path: CLIENT + '/build/development'
},
module: {
loaders: [
{
test: /\.scss$/,
loaders: ['style', 'raw', 'sass']
}, {
test: /\.css$/,
loaders: ['style', 'raw']
}, {
test: /\.js$/,
loader: 'babel'
}
]
},
sassLoader: {
includePaths: [CLIENT, ROOT + '/node_modules']
},
plugins: [
new webpack.ProvidePlugin({
$: "jquery",
jQuery: "jquery",
"window.jQuery": "jquery"
}),
new webpack.ProvidePlugin({
d3: "d3",
"window.d3": "d3"
})
],
node: {
fs: "empty"
},
resolve: {
alias: {
api: CLIENT + '/api/development',
config: CLIENT + '/config/development'
}
}
}