Skip to content

Commit 7612059

Browse files
committed
get babel 6 working
1 parent c452063 commit 7612059

File tree

5 files changed

+63
-16
lines changed

5 files changed

+63
-16
lines changed

.babelrc

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"plugins": [
3+
"syntax-async-functions",
4+
"syntax-class-properties",
5+
"syntax-trailing-function-commas",
6+
"transform-class-properties",
7+
"transform-es2015-arrow-functions",
8+
"transform-es2015-block-scoping",
9+
"transform-es2015-classes",
10+
"transform-es2015-computed-properties",
11+
"transform-es2015-constants",
12+
"transform-es2015-destructuring",
13+
["transform-es2015-modules-commonjs", {"strict": false, "allowTopLevelThis": true}],
14+
"transform-es2015-parameters",
15+
"transform-es2015-shorthand-properties",
16+
"transform-es2015-spread",
17+
"transform-es2015-template-literals",
18+
"transform-flow-strip-types",
19+
"transform-object-assign",
20+
"transform-object-rest-spread",
21+
"transform-react-display-name",
22+
"transform-react-jsx",
23+
"transform-regenerator",
24+
"transform-es2015-for-of"
25+
],
26+
}

ios/Sample/AppDelegate.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
3131
* on the same Wi-Fi network.
3232
*/
3333

34-
// jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios"];
34+
// jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"];
3535

3636
/**
3737
* OPTION 2

package.json

Lines changed: 33 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,11 @@
55
"scripts": {
66
"start": "node_modules/react-native/packager/packager.sh",
77
"test": "npm run mocha-test test/integration",
8-
"mocha-test": "mocha --recursive --compilers js:babel/register",
8+
"mocha-test": "mocha --recursive --compilers js:babel-core/register",
99
"compile:test": "TARGET=test node tasks/compile.js",
1010
"compile:staging": "TARGET=staging node tasks/compile.js",
1111
"install:staging": "PHONE=true TARGET=staging node tasks/compile.js"
1212
},
13-
"babel": {
14-
"whitelist": [
15-
"es6.modules",
16-
"es6.classes",
17-
"es6.arrowFunctions",
18-
"es6.constants",
19-
"es6.spread",
20-
"es6.blockScoping",
21-
"es6.parameters",
22-
"es6.destructuring"
23-
]
24-
},
2513
"dependencies": {
2614
"events": "1.1.0",
2715
"flux": "2.1.1",
@@ -37,7 +25,37 @@
3725
},
3826
"devDependencies": {
3927
"appium": "1.4.13",
40-
"babel": "6.3.13",
28+
"babel-core": "^6.1.20",
29+
"babel-eslint": "4.1.4",
30+
"babel-plugin-external-helpers-2": "^6.1.4",
31+
"babel-plugin-syntax-async-functions": "^6.0.14",
32+
"babel-plugin-syntax-class-properties": "^6.0.14",
33+
"babel-plugin-syntax-flow": "^6.0.14",
34+
"babel-plugin-syntax-jsx": "^6.0.14",
35+
"babel-plugin-syntax-trailing-function-commas": "^6.0.14",
36+
"babel-plugin-transform-class-properties": "^6.0.14",
37+
"babel-plugin-transform-es2015-arrow-functions": "^6.0.14",
38+
"babel-plugin-transform-es2015-block-scoping": "^6.0.18",
39+
"babel-plugin-transform-es2015-classes": "^6.1.2",
40+
"babel-plugin-transform-es2015-computed-properties": "^6.0.14",
41+
"babel-plugin-transform-es2015-constants": "^6.0.15",
42+
"babel-plugin-transform-es2015-destructuring": "^6.0.18",
43+
"babel-plugin-transform-es2015-for-of": "^6.0.14",
44+
"babel-plugin-transform-es2015-modules-commonjs": "^6.1.3",
45+
"babel-plugin-transform-es2015-parameters": "^6.0.18",
46+
"babel-plugin-transform-es2015-shorthand-properties": "^6.0.14",
47+
"babel-plugin-transform-es2015-spread": "^6.0.14",
48+
"babel-plugin-transform-es2015-template-literals": "^6.0.14",
49+
"babel-plugin-transform-flow-strip-types": "^6.0.14",
50+
"babel-plugin-transform-object-assign": "^6.0.14",
51+
"babel-plugin-transform-object-rest-spread": "^6.0.14",
52+
"babel-plugin-transform-react-display-name": "^6.0.14",
53+
"babel-plugin-transform-react-jsx": "^6.0.18",
54+
"babel-plugin-transform-regenerator": "^6.0.18",
55+
"babel-polyfill": "^6.0.16",
56+
"babel-register": "^6.3.13",
57+
"babel-types": "^6.1.2",
58+
"babylon": "^6.1.2",
4159
"chai": "3.4.1",
4260
"chai-as-promised": "5.1.0",
4361
"colors": "1.0.3",
@@ -48,6 +66,7 @@
4866
"promise": "*",
4967
"underscore": "1.8.3",
5068
"wd": "0.4.0",
69+
"webpack": "^1.12.9",
5170
"yiewd": "0.6.0"
5271
}
5372
}

test/helpers/driver.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ var server = {
1919

2020
var loadedAppium = null;
2121

22-
appiumPromise = new Promise(function (resolve, reject) {
22+
var appiumPromise = new Promise(function (resolve, reject) {
2323
appiumProc.stdout.on('data', function (data) {
2424
if (loadedAppium) return;
2525
console.log('APPIUM: ' + data);

test/helpers/server.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
require('babel-polyfill');
2+
13
var _ = require('underscore');
24
var colors = require('colors');
35
var koa = require('koa');

0 commit comments

Comments
 (0)