Skip to content

Commit

Permalink
Added babel plugin class properties
Browse files Browse the repository at this point in the history
  • Loading branch information
yusinto committed Jul 26, 2018
1 parent 1b8a56c commit 6bacb27
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 8 deletions.
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"react": "^16.4.1",
"react-dom": "^16.4.1",
"react-relay": "^1.6.0",
"relay-compiler-plus": "^1.8.1",
"relay-compiler-plus": "^1.8.2",
"relay-runtime": "^1.6.0"
},
"devDependencies": {
Expand Down
2 changes: 0 additions & 2 deletions example/src/universal/log.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import moment from 'moment';

module.exports = class Logger {
static LOG_LEVELS = {error: 10, warn: 20, info: 30, log: 40};

constructor(moduleName) {
this.moduleName = moduleName;
}
Expand Down
6 changes: 3 additions & 3 deletions example/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3671,9 +3671,9 @@ regjsparser@^0.3.0:
dependencies:
jsesc "~0.5.0"

relay-compiler-plus@^1.8.1:
version "1.8.1"
resolved "https://registry.yarnpkg.com/relay-compiler-plus/-/relay-compiler-plus-1.8.1.tgz#e277bbf68e98c5d5eaad6bab17bb585716495b9d"
relay-compiler-plus@^1.8.2:
version "1.8.2"
resolved "https://registry.yarnpkg.com/relay-compiler-plus/-/relay-compiler-plus-1.8.2.tgz#daac326405ca449cb15789e5d92cdfc44743482b"
dependencies:
"@babel/plugin-transform-async-to-generator" "^7.0.0-beta.54"
"@babel/plugin-transform-flow-strip-types" "^7.0.0-beta.54"
Expand Down
2 changes: 1 addition & 1 deletion graphqlJSCompiler/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = {
presets: ['@babel/preset-flow', ['@babel/preset-env', {
modules: 'commonjs'
}]],
plugins: ['@babel/plugin-transform-flow-strip-types', '@babel/plugin-transform-async-to-generator']
plugins: ['@babel/plugin-transform-flow-strip-types', '@babel/plugin-transform-async-to-generator', '@babel/plugin-proposal-class-properties']
}
}]
}
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"dependencies": {
"@babel/plugin-transform-async-to-generator": "^7.0.0-beta.54",
"@babel/plugin-transform-flow-strip-types": "^7.0.0-beta.54",
"@babel/plugin-proposal-class-properties":"^7.0.0-beta.54",
"@babel/polyfill": "^7.0.0-beta.54",
"@babel/preset-env": "^7.0.0-beta.54",
"@babel/preset-react": "^7.0.0-beta.54",
Expand Down
6 changes: 5 additions & 1 deletion src/graphqlJSCompiler/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ module.exports = {
options: {
babelrc: false,
presets: ['@babel/preset-flow', ['@babel/preset-env', {modules: 'commonjs'}]],
plugins: ['@babel/plugin-transform-flow-strip-types', '@babel/plugin-transform-async-to-generator'],
plugins: [
'@babel/plugin-transform-flow-strip-types',
'@babel/plugin-transform-async-to-generator',
'@babel/plugin-proposal-class-properties'
],
},
},
],
Expand Down
17 changes: 17 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,17 @@
"@babel/helper-remap-async-to-generator" "7.0.0-beta.54"
"@babel/plugin-syntax-async-generators" "7.0.0-beta.54"

"@babel/plugin-proposal-class-properties@^7.0.0-beta.54":
version "7.0.0-beta.54"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.0.0-beta.54.tgz#5953f0499c1e69e732d33a550bce8799aa6b76f3"
dependencies:
"@babel/helper-function-name" "7.0.0-beta.54"
"@babel/helper-member-expression-to-functions" "7.0.0-beta.54"
"@babel/helper-optimise-call-expression" "7.0.0-beta.54"
"@babel/helper-plugin-utils" "7.0.0-beta.54"
"@babel/helper-replace-supers" "7.0.0-beta.54"
"@babel/plugin-syntax-class-properties" "7.0.0-beta.54"

"@babel/plugin-proposal-object-rest-spread@7.0.0-beta.54":
version "7.0.0-beta.54"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.0.0-beta.54.tgz#5481269a020dd0d38715a8094fed015d30ef4c2a"
Expand Down Expand Up @@ -308,6 +319,12 @@
dependencies:
"@babel/helper-plugin-utils" "7.0.0-beta.54"

"@babel/plugin-syntax-class-properties@7.0.0-beta.54":
version "7.0.0-beta.54"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.0.0-beta.54.tgz#5e70f22dc3628c1d35402b63ff1a8f8e005bd871"
dependencies:
"@babel/helper-plugin-utils" "7.0.0-beta.54"

"@babel/plugin-syntax-flow@7.0.0-beta.54":
version "7.0.0-beta.54"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.0.0-beta.54.tgz#8d38fffa6da16e2d327f5fee4f90913b14d43d14"
Expand Down

0 comments on commit 6bacb27

Please sign in to comment.