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 * 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", "homepage": "https://github.com/dataarts/dat.gui#readme",
"devDependencies": { "devDependencies": {
"babel-core": "^5.8.22", "babel-core": "^6.14.0",
"babel-eslint": "^4.0.5", "babel-loader": "^6.2.5",
"babel-loader": "^5.3.2", "babel-preset-es2015": "^6.14.0",
"css-loader": "^0.16.0", "babel-preset-stage-0": "^6.5.0",
"esdoc": "^0.2.1", "css-loader": "^0.25.0",
"esdoc-es7-plugin": "0.0.1", "eslint": "^3.5.0",
"eslint": "^3.4.0", "eslint-config-airbnb-base": "^7.1.0",
"eslint-config-airbnb-base": "^5.0.3", "eslint-loader": "^1.5.0",
"eslint-loader": "^1.0.0", "eslint-plugin-import": "^1.15.0",
"eslint-plugin-import": "^1.14.0",
"eslint-plugin-jsx-a11y": "^2.2.1",
"eslint-plugin-react": "^6.2.0",
"extend": "^3.0.0", "extend": "^3.0.0",
"html-loader": "^0.3.0", "html-loader": "^0.4.4",
"node-sass": "^3.2.0", "node-sass": "^3.10.0",
"sass-loader": "^2.0.0", "sass-loader": "^4.0.2",
"style-loader": "^0.12.3", "webpack": "^1.13.2"
"webpack": "^1.11.0"
},
"dependencies": {
"babel": "^5.8.21"
},
"babel": {
"stage": 0,
"loose": "all"
}, },
"dependencies": {},
"eslintConfig": { "eslintConfig": {
"extends": "airbnb-base", "extends": "airbnb-base",
"rules": { "rules": {
@ -69,7 +59,9 @@
"max-len": 0, "max-len": 0,
"no-param-reassign": 0, "no-param-reassign": 0,
"consistent-return": 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 * 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 { export default {
color: { color: {
Color: require('./color/Color'), Color: Color,
math: require('./color/math'), math: math,
interpret: require('./color/interpret') interpret: interpret
}, },
controllers: { controllers: {
Controller: require('./controllers/Controller'), Controller: Controller,
BooleanController: require('./controllers/BooleanController'), BooleanController: BooleanController,
OptionController: require('./controllers/OptionController'), OptionController: OptionController,
StringController: require('./controllers/StringController'), StringController: StringController,
NumberController: require('./controllers/NumberController'), NumberController: NumberController,
NumberControllerBox: require('./controllers/NumberControllerBox'), NumberControllerBox: NumberControllerBox,
NumberControllerSlider: require('./controllers/NumberControllerSlider'), NumberControllerSlider: NumberControllerSlider,
FunctionController: require('./controllers/FunctionController'), FunctionController: FunctionController,
ColorController: require('./controllers/ColorController') ColorController: ColorController
}, },
dom: { dom: {
dom: require('./dom/dom') dom: dom
}, },
gui: { gui: {
GUI: require('./gui/GUI') GUI: GUI
}, },
GUI: require('./gui/GUI') GUI: GUI
}; };

View File

@ -24,16 +24,21 @@ module.exports = {
}, },
module: { module: {
loaders: [ preLoaders: [
{
test: /\.jsx?$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel'
},
{ {
test: /\.js$/, 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$/, test: /\.css$/,