mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-20 15:32:57 +01:00
update babel, webpack and add adding react
This commit is contained in:
parent
4211c02bc8
commit
d7d7e2e597
4 changed files with 44 additions and 27 deletions
2
.babelrc
2
.babelrc
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"presets": ["es2015"]
|
||||
"presets": ["es2015", "react"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,9 @@
|
|||
"globals" : {
|
||||
"THREE" : true,
|
||||
"CSG" : true,
|
||||
"PNLTRI" : true
|
||||
"PNLTRI" : true,
|
||||
"__DEBUG__": true,
|
||||
"$": true
|
||||
},
|
||||
"rules": {
|
||||
"comma-dangle": "off",
|
||||
41
package.json
41
package.json
|
|
@ -6,7 +6,7 @@
|
|||
"start": "node ./node_modules/webpack-dev-server/bin/webpack-dev-server.js --config webpack.config.dev.js --content-base web/ --port 3000",
|
||||
"pack": "node ./node_modules/webpack/bin/webpack.js --config webpack.config.js --progress --profile --colors",
|
||||
"build": "grunt",
|
||||
"lint": "eslint web/app -c ./build/.eslintrc.json --ignore-path ./build/.eslintignore"
|
||||
"lint": "eslint web/app"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
@ -23,34 +23,39 @@
|
|||
},
|
||||
"homepage": "https://github.com/xibyte/jsketcher",
|
||||
"devDependencies": {
|
||||
"babel-cli": "6.14.0",
|
||||
"babel-core": "6.14.0",
|
||||
"babel-eslint": "6.1.2",
|
||||
"babel-loader": "6.2.5",
|
||||
"babel-preset-es2015": "6.14.0",
|
||||
"babel-polyfill": "6.20.0",
|
||||
"css-loader": "0.24.0",
|
||||
"less-loader": "2.2.3",
|
||||
"eslint": "3.2.0",
|
||||
"eslint-config-airbnb-base": "5.0.1",
|
||||
"eslint-plugin-babel": "3.2.0",
|
||||
"eslint-plugin-import": "1.12.0",
|
||||
"babel-cli": "6.26.0",
|
||||
"babel-core": "6.26.0",
|
||||
"babel-eslint": "8.0.2",
|
||||
"babel-loader": "7.1.2",
|
||||
"babel-preset-es2015": "6.24.1",
|
||||
"babel-preset-stage-2": "6.24.1",
|
||||
"babel-polyfill": "6.26.0",
|
||||
"babel-preset-react": "6.24.1",
|
||||
|
||||
"css-loader": "0.28.7",
|
||||
"less-loader": "4.0.5",
|
||||
"eslint": "4.13.1",
|
||||
"eslint-plugin-babel": "4.1.2",
|
||||
"eslint-plugin-import": "2.8.0",
|
||||
"eslint-plugin-react": "7.5.1",
|
||||
"style-loader": "0.13.1",
|
||||
"webpack": "1.13.2",
|
||||
"webpack-dev-server": "1.15.0",
|
||||
"webpack": "3.10.0",
|
||||
"webpack-dev-server": "2.9.7",
|
||||
"grunt": "1.0.1",
|
||||
"grunt-contrib-copy": "1.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "16.2.0",
|
||||
"react-dom": "16.2.0",
|
||||
"clipper-lib": "6.2.1",
|
||||
"diff-match-patch": "1.0.0",
|
||||
"earcut": "2.1.1",
|
||||
"handlebars": "4.0.6",
|
||||
"handlebars-loader": "1.4.0",
|
||||
"handlebars": "4.0.11",
|
||||
"handlebars-loader": "1.6.0",
|
||||
"jquery": "2.1.0",
|
||||
"json-loader": "0.5.4 ",
|
||||
"jwerty": "0.3.2",
|
||||
"less": "2.7.1",
|
||||
"less": "2.7.3",
|
||||
"libtess": "1.2.2",
|
||||
"numeric": "1.2.6",
|
||||
"sprintf": "0.1.5"
|
||||
|
|
|
|||
|
|
@ -19,26 +19,36 @@ module.exports = {
|
|||
plugins: [
|
||||
new webpack.HotModuleReplacementPlugin(),
|
||||
],
|
||||
resolve: {
|
||||
extensions: ['.js', '.jsx']
|
||||
},
|
||||
module: {
|
||||
loaders: [{
|
||||
test: /\.js$/,
|
||||
loaders: ['babel'],
|
||||
rules: [{
|
||||
test: /\.(js|jsx)$/,
|
||||
use: ['babel-loader'],
|
||||
include: [path.join(__dirname, 'web/app'), path.join(__dirname, 'web/test')]
|
||||
}, {
|
||||
test: /\.css$/,
|
||||
loader: 'style!css'
|
||||
use: [
|
||||
"style-loader",
|
||||
"css-loader",
|
||||
]
|
||||
},
|
||||
{
|
||||
test: /\.less$/,
|
||||
loader: "style!css?-url!less"
|
||||
use: [
|
||||
"style-loader",
|
||||
"css-loader?-url",
|
||||
"less-loader"
|
||||
]
|
||||
},
|
||||
{
|
||||
test: /\.html$/,
|
||||
loader: 'handlebars?helperDirs[]=' + __dirname + '/web/app/ui/helpers'
|
||||
use: 'handlebars-loader?helperDirs[]=' + __dirname + '/web/app/ui/helpers'
|
||||
},
|
||||
{
|
||||
test: /\.json$/,
|
||||
loader: 'json'
|
||||
use: 'json-loader'
|
||||
}]
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue