add transform-class-properties

This commit is contained in:
casperlamboo 2017-12-21 12:49:44 +01:00
parent 9fc1ba1cb8
commit 745c675f67
4 changed files with 14 additions and 34 deletions

View File

@ -18,6 +18,7 @@
} }
}, },
"plugins": [ "plugins": [
"transform-class-properties",
"transform-object-rest-spread", "transform-object-rest-spread",
"transform-runtime", "transform-runtime",
"transform-es2015-classes" "transform-es2015-classes"

43
package-lock.json generated
View File

@ -209,14 +209,12 @@
"ansi-regex": { "ansi-regex": {
"version": "2.1.1", "version": "2.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
"dev": true
}, },
"ansi-styles": { "ansi-styles": {
"version": "2.2.1", "version": "2.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4="
"dev": true
}, },
"anymatch": { "anymatch": {
"version": "1.3.0", "version": "1.3.0",
@ -426,7 +424,6 @@
"version": "6.22.0", "version": "6.22.0",
"resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.22.0.tgz", "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.22.0.tgz",
"integrity": "sha1-AnYgvuVnqIwyVhV05/0IAdMxGOQ=", "integrity": "sha1-AnYgvuVnqIwyVhV05/0IAdMxGOQ=",
"dev": true,
"requires": { "requires": {
"chalk": "1.1.3", "chalk": "1.1.3",
"esutils": "2.0.2", "esutils": "2.0.2",
@ -620,7 +617,6 @@
"version": "6.24.1", "version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz", "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz",
"integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=",
"dev": true,
"requires": { "requires": {
"babel-helper-get-function-arity": "6.24.1", "babel-helper-get-function-arity": "6.24.1",
"babel-runtime": "6.26.0", "babel-runtime": "6.26.0",
@ -633,7 +629,6 @@
"version": "6.24.1", "version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz", "resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz",
"integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=",
"dev": true,
"requires": { "requires": {
"babel-runtime": "6.26.0", "babel-runtime": "6.26.0",
"babel-types": "6.25.0" "babel-types": "6.25.0"
@ -752,7 +747,6 @@
"version": "6.23.0", "version": "6.23.0",
"resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz",
"integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=",
"dev": true,
"requires": { "requires": {
"babel-runtime": "6.26.0" "babel-runtime": "6.26.0"
} }
@ -787,8 +781,7 @@
"babel-plugin-syntax-class-properties": { "babel-plugin-syntax-class-properties": {
"version": "6.13.0", "version": "6.13.0",
"resolved": "https://registry.npmjs.org/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz", "resolved": "https://registry.npmjs.org/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz",
"integrity": "sha1-1+sjt5oxf4VDlixQW4J8fWysJ94=", "integrity": "sha1-1+sjt5oxf4VDlixQW4J8fWysJ94="
"dev": true
}, },
"babel-plugin-syntax-decorators": { "babel-plugin-syntax-decorators": {
"version": "6.13.0", "version": "6.13.0",
@ -887,7 +880,6 @@
"version": "6.24.1", "version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz", "resolved": "https://registry.npmjs.org/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz",
"integrity": "sha1-anl2PqYdM9NvN7YRqp3vgagbRqw=", "integrity": "sha1-anl2PqYdM9NvN7YRqp3vgagbRqw=",
"dev": true,
"requires": { "requires": {
"babel-helper-function-name": "6.24.1", "babel-helper-function-name": "6.24.1",
"babel-plugin-syntax-class-properties": "6.13.0", "babel-plugin-syntax-class-properties": "6.13.0",
@ -1655,7 +1647,6 @@
"version": "6.25.0", "version": "6.25.0",
"resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.25.0.tgz", "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.25.0.tgz",
"integrity": "sha1-ZlJBFmt8KqTGGdceGSlpVSsQwHE=", "integrity": "sha1-ZlJBFmt8KqTGGdceGSlpVSsQwHE=",
"dev": true,
"requires": { "requires": {
"babel-runtime": "6.26.0", "babel-runtime": "6.26.0",
"babel-traverse": "6.25.0", "babel-traverse": "6.25.0",
@ -1668,7 +1659,6 @@
"version": "6.25.0", "version": "6.25.0",
"resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.25.0.tgz", "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.25.0.tgz",
"integrity": "sha1-IldJfi/NGbie3BPEyROB+VEklvE=", "integrity": "sha1-IldJfi/NGbie3BPEyROB+VEklvE=",
"dev": true,
"requires": { "requires": {
"babel-code-frame": "6.22.0", "babel-code-frame": "6.22.0",
"babel-messages": "6.23.0", "babel-messages": "6.23.0",
@ -1685,7 +1675,6 @@
"version": "6.25.0", "version": "6.25.0",
"resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.25.0.tgz", "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.25.0.tgz",
"integrity": "sha1-cK+ySNVmDl0Y+BHZHIMDtUE0oY4=", "integrity": "sha1-cK+ySNVmDl0Y+BHZHIMDtUE0oY4=",
"dev": true,
"requires": { "requires": {
"babel-runtime": "6.26.0", "babel-runtime": "6.26.0",
"esutils": "2.0.2", "esutils": "2.0.2",
@ -1696,8 +1685,7 @@
"babylon": { "babylon": {
"version": "6.17.4", "version": "6.17.4",
"resolved": "https://registry.npmjs.org/babylon/-/babylon-6.17.4.tgz", "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.17.4.tgz",
"integrity": "sha1-Pot0AriNIsNCPhN6FXeIOxX/hpo=", "integrity": "sha1-Pot0AriNIsNCPhN6FXeIOxX/hpo="
"dev": true
}, },
"balanced-match": { "balanced-match": {
"version": "1.0.0", "version": "1.0.0",
@ -2074,7 +2062,6 @@
"version": "1.1.3", "version": "1.1.3",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"dev": true,
"requires": { "requires": {
"ansi-styles": "2.2.1", "ansi-styles": "2.2.1",
"escape-string-regexp": "1.0.5", "escape-string-regexp": "1.0.5",
@ -2459,7 +2446,6 @@
"version": "2.6.8", "version": "2.6.8",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz",
"integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=",
"dev": true,
"requires": { "requires": {
"ms": "2.0.0" "ms": "2.0.0"
} }
@ -2930,8 +2916,7 @@
"escape-string-regexp": { "escape-string-regexp": {
"version": "1.0.5", "version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
"dev": true
}, },
"escope": { "escope": {
"version": "3.6.0", "version": "3.6.0",
@ -2970,8 +2955,7 @@
"esutils": { "esutils": {
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
"integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs="
"dev": true
}, },
"etag": { "etag": {
"version": "1.8.1", "version": "1.8.1",
@ -4339,8 +4323,7 @@
"globals": { "globals": {
"version": "9.18.0", "version": "9.18.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz",
"integrity": "sha1-qjiWs+abSH8X4x7SFD1pqOMMLYo=", "integrity": "sha1-qjiWs+abSH8X4x7SFD1pqOMMLYo="
"dev": true
}, },
"globby": { "globby": {
"version": "6.1.0", "version": "6.1.0",
@ -4408,7 +4391,6 @@
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
"integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
"dev": true,
"requires": { "requires": {
"ansi-regex": "2.1.1" "ansi-regex": "2.1.1"
} }
@ -4862,7 +4844,6 @@
"version": "2.2.2", "version": "2.2.2",
"resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz", "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz",
"integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=", "integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=",
"dev": true,
"requires": { "requires": {
"loose-envify": "1.3.1" "loose-envify": "1.3.1"
} }
@ -6057,8 +6038,7 @@
"ms": { "ms": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
"dev": true
}, },
"multicast-dns": { "multicast-dns": {
"version": "6.1.1", "version": "6.1.1",
@ -7945,7 +7925,6 @@
"version": "3.0.1", "version": "3.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"dev": true,
"requires": { "requires": {
"ansi-regex": "2.1.1" "ansi-regex": "2.1.1"
} }
@ -7980,8 +7959,7 @@
"supports-color": { "supports-color": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc="
"dev": true
}, },
"symbol-observable": { "symbol-observable": {
"version": "1.0.4", "version": "1.0.4",
@ -8117,8 +8095,7 @@
"to-fast-properties": { "to-fast-properties": {
"version": "1.0.3", "version": "1.0.3",
"resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz",
"integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc="
"dev": true
}, },
"to-integer-x": { "to-integer-x": {
"version": "3.0.0", "version": "3.0.0",

View File

@ -16,6 +16,7 @@
}, },
"dependencies": { "dependencies": {
"@doodle3d/clipper-js": "^1.0.7", "@doodle3d/clipper-js": "^1.0.7",
"babel-plugin-transform-class-properties": "^6.24.1",
"file-saver": "^1.3.3", "file-saver": "^1.3.3",
"lodash": "^4.17.4", "lodash": "^4.17.4",
"material-ui": "^0.19.4", "material-ui": "^0.19.4",

View File

@ -13,6 +13,7 @@ const babelLoader = {
require('babel-preset-react') require('babel-preset-react')
], ],
plugins: [ plugins: [
require('babel-plugin-transform-class-properties'),
require('babel-plugin-transform-object-rest-spread'), require('babel-plugin-transform-object-rest-spread'),
require('babel-plugin-transform-runtime'), require('babel-plugin-transform-runtime'),
require('babel-plugin-transform-es2015-classes') require('babel-plugin-transform-es2015-classes')
@ -37,7 +38,7 @@ module.exports = {
} }
}, },
module: { module: {
rules: [ rules: [
{ {
test: /\.js$/, test: /\.js$/,
exclude: /node_modules/, exclude: /node_modules/,