Skip to content

Commit 5cb990d

Browse files
fsonbrentvatne
authored andcommitted
Fix the react-native-scripts watcher (expo#278)
Do not purge other files from the build folder every time a file a changed.
1 parent 60fde08 commit 5cb990d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

react-native-scripts/flyfile.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,13 @@ export default async function (fly) {
1111
}
1212

1313
export async function babel(fly, opts) {
14-
await fly.clear(paths.build).source(opts.src || paths.source).babel().target(paths.build);
14+
await fly.source(opts.src || paths.source).babel().target(paths.build);
1515
}
1616

1717
export async function clean(fly) {
1818
await fly.clear(paths.build);
1919
}
20+
21+
export async function build(fly, opts) {
22+
await fly.serial(['clean', 'babel'], opts);
23+
}

react-native-scripts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
},
2222
"scripts": {
2323
"start": "fly",
24-
"build": "fly babel"
24+
"build": "fly build"
2525
},
2626
"dependencies": {
2727
"babel-runtime": "^6.9.2",

0 commit comments

Comments
 (0)