Skip to content

Commit

Permalink
refactor: use lux babel preset
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharygolba committed Jun 12, 2016
1 parent 2512e85 commit 53e257a
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 70 deletions.
13 changes: 4 additions & 9 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
{
"presets": [
"lux"
],
"plugins": [
"external-helpers-2",
"syntax-flow",
"syntax-trailing-function-commas",
"transform-decorators-legacy",
"transform-flow-strip-types",
"transform-class-properties",
"transform-decorators",
"transform-es2015-destructuring",
"transform-es2015-parameters",
"transform-es2015-spread",
"transform-object-rest-spread",
"transform-async-to-generator",
"transform-exponentiation-operator"
"transform-decorators"
]
}
10 changes: 1 addition & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,22 +55,14 @@
},
"devDependencies": {
"babel-core": "6.9.1",
"babel-plugin-external-helpers-2": "6.3.13",
"babel-plugin-syntax-flow": "6.8.0",
"babel-plugin-syntax-trailing-function-commas": "6.8.0",
"babel-plugin-transform-async-to-generator": "6.8.0",
"babel-plugin-transform-class-properties": "6.9.1",
"babel-plugin-transform-decorators": "6.8.0",
"babel-eslint": "6.0.4",
"babel-loader": "6.2.4",
"babel-plugin-transform-decorators-legacy": "1.3.4",
"babel-plugin-transform-es2015-destructuring": "6.9.0",
"babel-plugin-transform-es2015-modules-commonjs": "6.8.0",
"babel-plugin-transform-es2015-parameters": "6.9.0",
"babel-plugin-transform-es2015-spread": "6.8.0",
"babel-plugin-transform-exponentiation-operator": "6.8.0",
"babel-plugin-transform-flow-strip-types": "6.8.0",
"babel-plugin-transform-object-rest-spread": "6.8.0",
"babel-preset-lux": "1.0.0",
"chai": "3.5.0",
"documentation": "4.0.0-beta5",
"flow-bin": "0.26.0",
Expand Down
14 changes: 1 addition & 13 deletions src/packages/cli/templates/babel-rc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,6 @@ import template from '../../template';
*/
export default (): string => template`
{
"plugins": [
"external-helpers-2",
"syntax-trailing-function-commas",
"transform-decorators-legacy",
"transform-class-properties",
"transform-decorators",
"transform-es2015-destructuring",
"transform-es2015-parameters",
"transform-es2015-spread",
"transform-object-rest-spread",
"transform-async-to-generator",
"transform-exponentiation-operator"
]
"presets": ["lux"]
}
`;
20 changes: 5 additions & 15 deletions src/packages/cli/templates/package-json.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// @flow
import { version } from '../../../../package.json';

import { version, devDependencies } from '../../../../package.json';
import template from '../../template';

const VERSION: string = version;
const LUX_VERSION: string = version;
const BABEL_PRESET_VERSION: string = devDependencies['babel-preset-lux'];

/**
* @private
Expand All @@ -21,19 +21,9 @@ export default (name: string): string => template`
"license": "MIT",
"dependencies": {
"babel-core": "6.9.1",
"babel-plugin-external-helpers-2": "6.3.13",
"babel-plugin-syntax-trailing-function-commas": "6.8.0",
"babel-plugin-transform-async-to-generator": "6.8.0",
"babel-plugin-transform-class-properties": "6.9.1",
"babel-plugin-transform-decorators": "6.8.0",
"babel-plugin-transform-decorators-legacy": "1.3.4",
"babel-plugin-transform-es2015-destructuring": "6.9.0",
"babel-plugin-transform-es2015-parameters": "6.9.0",
"babel-plugin-transform-es2015-spread": "6.8.0",
"babel-plugin-transform-exponentiation-operator": "6.8.0",
"babel-plugin-transform-object-rest-spread": "6.8.0",
"babel-preset-lux": "${BABEL_PRESET_VERSION}",
"knex": "0.11.5",
"lux-framework": "${VERSION}"
"lux-framework": "${LUX_VERSION}"
}
}
`;
14 changes: 1 addition & 13 deletions test/test-app/.babelrc
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
{
"plugins": [
"external-helpers-2",
"syntax-trailing-function-commas",
"transform-decorators-legacy",
"transform-class-properties",
"transform-decorators",
"transform-es2015-destructuring",
"transform-es2015-parameters",
"transform-es2015-spread",
"transform-object-rest-spread",
"transform-async-to-generator",
"transform-exponentiation-operator"
]
"presets": ["lux"]
}
12 changes: 1 addition & 11 deletions test/test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,7 @@
"dependencies": {
"babel-core": "6.9.1",
"babel-eslint": "6.0.4",
"babel-plugin-external-helpers-2": "6.3.13",
"babel-plugin-syntax-trailing-function-commas": "6.8.0",
"babel-plugin-transform-async-to-generator": "6.8.0",
"babel-plugin-transform-class-properties": "6.9.1",
"babel-plugin-transform-decorators": "6.8.0",
"babel-plugin-transform-decorators-legacy": "1.3.4",
"babel-plugin-transform-es2015-destructuring": "6.9.0",
"babel-plugin-transform-es2015-parameters": "6.9.0",
"babel-plugin-transform-es2015-spread": "6.8.0",
"babel-plugin-transform-exponentiation-operator": "6.8.0",
"babel-plugin-transform-object-rest-spread": "6.8.0",
"babel-preset-lux": "1.0.0",
"knex": "0.11.5",
"mysql2": "1.0.0-rc.2",
"pg": "4.5.6",
Expand Down

0 comments on commit 53e257a

Please sign in to comment.