Skip to content

Commit 8f778a6

Browse files
committed
compiling react.js and react-native.js before npm publish
1 parent 6f906c4 commit 8f778a6

File tree

10 files changed

+22
-6
lines changed

10 files changed

+22
-6
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ npm-debug.log
33
.DS_Store
44
lib
55
coverage
6+
./react.js
7+
./react-native.js

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
"description": "An experiment in fully hot-reloadable Flux",
55
"main": "lib/index.js",
66
"scripts": {
7-
"build": "npm run lint && babel src --out-dir lib",
8-
"clean": "rimraf ./lib",
9-
"lint": "eslint src test",
10-
"prepublish": "npm run clean && npm run build",
7+
"build": "scripts/build",
8+
"clean": "scripts/clean",
9+
"lint": "scripts/lint",
10+
"prepublish": "scripts/prepublish",
1111
"start": "cd examples && node server.js",
1212
"test": "NODE_ENV=test mocha --compilers js:babel/register --recursive",
1313
"test:watch": "npm run test -- --watch",

react-native.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

react.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

scripts/build

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
#!/bin/sh
2+
23
rm -rf lib
34
./node_modules/.bin/babel src --out-dir lib
5+
6+
mv lib/react-entry.js ./react.js
7+
mv lib/react-native-entry.js ./react-native.js

scripts/clean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
3+
`npm bin`/rimraf ./lib

scripts/lint

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
3+
eslint src test

scripts/prepublish

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
3+
sh scripts/clean
4+
sh scripts/build

src/react-entry.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from 'lib/react';

src/react-native-entry.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from 'lib/react-native';

0 commit comments

Comments
 (0)