Skip to content

Commit 9156248

Browse files
lukeedanp
authored andcommitted
Replace Gulp with Fly (#52)
* remove gulp deps * install fly deps * replace 'gulp' bin with 'fly' bin * replace gulpfile with flyfile * add sourceMaps:true (external) to babelrc * remove publish task/fly-shell from /app * convert tabs to spaces
1 parent 85a6ae3 commit 9156248

File tree

10 files changed

+1671
-3101
lines changed

10 files changed

+1671
-3101
lines changed

create-react-native-app/.babelrc

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"sourceMaps": true,
23
"presets": ["es2015", "stage-1"],
34
"plugins": ["transform-runtime", "add-module-exports", "transform-flow-strip-types"]
45
}

create-react-native-app/flyfile.js

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
const { join } = require('path');
2+
3+
const paths = {
4+
build: 'build',
5+
source: 'src/**/*.js',
6+
sourceRoot: join(__dirname, 'src'),
7+
};
8+
9+
export default async function (fly) {
10+
await fly.watch(paths.source, 'babel');
11+
}
12+
13+
export async function babel(fly, opts) {
14+
await fly.source(opts.src || paths.source).babel().target(paths.build);
15+
}
16+
17+
export async function clean(fly) {
18+
await fly.clear(paths.build);
19+
}
20+
21+
export async function build(fly) {
22+
await fly.start('babel');
23+
}

create-react-native-app/gulpfile.js

-40
This file was deleted.

create-react-native-app/package.json

+10-8
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
"version": "0.0.6",
44
"description": "Create React Native apps with no build configuration.",
55
"license": "BSD-3-Clause",
6-
"keywords": ["react-native", "react"],
6+
"keywords": [
7+
"react-native",
8+
"react"
9+
],
710
"homepage": "https://github.com/react-community/create-react-native-app",
811
"bugs": "https://github.com/react-community/create-react-native-app",
912
"preferGlobal": true,
@@ -17,7 +20,7 @@
1720
"create-react-native-app": "./build/index.js"
1821
},
1922
"scripts": {
20-
"start": "gulp"
23+
"start": "fly"
2124
},
2225
"dependencies": {
2326
"babel-runtime": "^6.9.2",
@@ -35,11 +38,10 @@
3538
"babel-plugin-transform-runtime": "^6.9.0",
3639
"babel-preset-es2015": "^6.9.0",
3740
"babel-preset-stage-1": "^6.5.0",
38-
"gulp": "git+https://github.com/gulpjs/gulp#4.0",
39-
"gulp-babel": "^6.1.2",
40-
"gulp-changed": "^1.3.0",
41-
"gulp-plumber": "^1.1.0",
42-
"gulp-sourcemaps": "^1.6.0",
43-
"rimraf": "^2.5.2"
41+
"fly": "^2.0.5",
42+
"fly-babel": "^2.1.1",
43+
"fly-clear": "^1.0.1",
44+
"fly-esnext": "^2.0.0",
45+
"fly-watch": "^1.1.1"
4446
}
4547
}

0 commit comments

Comments
 (0)