upgrade to Babel 6, fix dependancies

This commit is contained in:
Jeff Nusz 2016-09-22 15:51:47 -07:00
parent 977177cb0b
commit 46c2a883fc
4 changed files with 65 additions and 49 deletions

View File

@ -11,4 +11,6 @@
* http://www.apache.org/licenses/LICENSE-2.0
*/
export default require('./src/dat/index');
import dat from './src/dat/index';
module.exports = dat;

View File

@ -23,32 +23,22 @@
},
"homepage": "https://github.com/dataarts/dat.gui#readme",
"devDependencies": {
"babel-core": "^5.8.22",
"babel-eslint": "^4.0.5",
"babel-loader": "^5.3.2",
"css-loader": "^0.16.0",
"esdoc": "^0.2.1",
"esdoc-es7-plugin": "0.0.1",
"eslint": "^3.4.0",
"eslint-config-airbnb-base": "^5.0.3",
"eslint-loader": "^1.0.0",
"eslint-plugin-import": "^1.14.0",
"eslint-plugin-jsx-a11y": "^2.2.1",
"eslint-plugin-react": "^6.2.0",
"babel-core": "^6.14.0",
"babel-loader": "^6.2.5",
"babel-preset-es2015": "^6.14.0",
"babel-preset-stage-0": "^6.5.0",
"css-loader": "^0.25.0",
"eslint": "^3.5.0",
"eslint-config-airbnb-base": "^7.1.0",
"eslint-loader": "^1.5.0",
"eslint-plugin-import": "^1.15.0",
"extend": "^3.0.0",
"html-loader": "^0.3.0",
"node-sass": "^3.2.0",
"sass-loader": "^2.0.0",
"style-loader": "^0.12.3",
"webpack": "^1.11.0"
},
"dependencies": {
"babel": "^5.8.21"
},
"babel": {
"stage": 0,
"loose": "all"
"html-loader": "^0.4.4",
"node-sass": "^3.10.0",
"sass-loader": "^4.0.2",
"webpack": "^1.13.2"
},
"dependencies": {},
"eslintConfig": {
"extends": "airbnb-base",
"rules": {
@ -69,7 +59,9 @@
"max-len": 0,
"no-param-reassign": 0,
"consistent-return": 0,
"no-restricted-syntax": 1
"no-restricted-syntax": 1,
"no-bitwise": 0,
"no-plusplus": 0
}
}
}

View File

@ -11,32 +11,49 @@
* http://www.apache.org/licenses/LICENSE-2.0
*/
import Color from './color/Color';
import math from './color/math';
import interpret from './color/interpret';
import Controller from './controllers/Controller';
import BooleanController from './controllers/BooleanController';
import OptionController from './controllers/OptionController';
import StringController from './controllers/StringController';
import NumberController from './controllers/NumberController';
import NumberControllerBox from './controllers/NumberControllerBox';
import NumberControllerSlider from './controllers/NumberControllerSlider';
import FunctionController from './controllers/FunctionController';
import ColorController from './controllers/ColorController';
import dom from './dom/dom';
import GUI from './gui/GUI';
export default {
color: {
Color: require('./color/Color'),
math: require('./color/math'),
interpret: require('./color/interpret')
Color: Color,
math: math,
interpret: interpret
},
controllers: {
Controller: require('./controllers/Controller'),
BooleanController: require('./controllers/BooleanController'),
OptionController: require('./controllers/OptionController'),
StringController: require('./controllers/StringController'),
NumberController: require('./controllers/NumberController'),
NumberControllerBox: require('./controllers/NumberControllerBox'),
NumberControllerSlider: require('./controllers/NumberControllerSlider'),
FunctionController: require('./controllers/FunctionController'),
ColorController: require('./controllers/ColorController')
Controller: Controller,
BooleanController: BooleanController,
OptionController: OptionController,
StringController: StringController,
NumberController: NumberController,
NumberControllerBox: NumberControllerBox,
NumberControllerSlider: NumberControllerSlider,
FunctionController: FunctionController,
ColorController: ColorController
},
dom: {
dom: require('./dom/dom')
dom: dom
},
gui: {
GUI: require('./gui/GUI')
GUI: GUI
},
GUI: require('./gui/GUI')
GUI: GUI
};

View File

@ -24,16 +24,21 @@ module.exports = {
},
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel'
},
preLoaders: [
{
test: /\.js$/,
loader: 'eslint-loader',
exclude: /(node_modules|bower_components)/
exclude: /(node_modules|bower_components)/,
loader: 'eslint-loader'
},
],
loaders: [
{
test: /\.js$/,
loader: 'babel',
exclude: /(node_modules|bower_components)/,
query: {
presets: [["es2015", {"loose": true}], "stage-0"]
}
},
{
test: /\.css$/,