Skip to content

Commit 512df85

Browse files
authored
chore: Add bob to package the library (react-native-netinfo#49)
[ci skip]
1 parent 00cd8a7 commit 512df85

File tree

5 files changed

+181
-94
lines changed

5 files changed

+181
-94
lines changed

.flowconfig

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
[ignore]
2+
; Ignore the compiled files
3+
lib/.*
4+
25
; This flowconfig is forked by platform - the only difference between them is which suffix is ignored.
36
.*/*[.]android.js
47
;.*/*[.]ios.js

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,6 @@ example/android-bundle.js
5555
example/ios-bundle.js
5656
index.android.bundle
5757
index.ios.bundle
58+
59+
# generated by bob
60+
lib/

.npmignore

+1-86
Original file line numberDiff line numberDiff line change
@@ -1,86 +1 @@
1-
# JS
2-
node_modules
3-
yarn.lock
4-
5-
# Project files
6-
CONTRIBUTING.md
7-
CODE_OF_CONDUCT.md
8-
README.md
9-
10-
# Config files
11-
.babelrc
12-
babel.config.js
13-
.editorconfig
14-
.eslintrc
15-
.flowconfig
16-
.watchmanconfig
17-
jsconfig.json
18-
.npmrc
19-
.gitattributes
20-
.circleci
21-
*.coverage.json
22-
.opensource
23-
.circleci
24-
.eslintignore
25-
codecov.yml
26-
27-
# Example
28-
example/
29-
30-
# Android
31-
android/*/build/
32-
android/gradlew
33-
android/build
34-
android/gradlew.bat
35-
android/gradle/
36-
android/com_crashlytics_export_strings.xml
37-
android/local.properties
38-
android/.gradle/
39-
android/.signing/
40-
android/.idea/gradle.xml
41-
android/.idea/libraries/
42-
android/.idea/workspace.xml
43-
android/.idea/tasks.xml
44-
android/.idea/.name
45-
android/.idea/compiler.xml
46-
android/.idea/copyright/profiles_settings.xml
47-
android/.idea/encodings.xml
48-
android/.idea/misc.xml
49-
android/.idea/modules.xml
50-
android/.idea/scopes/scope_settings.xml
51-
android/.idea/vcs.xml
52-
android/*.iml
53-
android/.settings
54-
55-
# iOS
56-
ios/*.xcodeproj/xcuserdata
57-
*.pbxuser
58-
*.mode1v3
59-
*.mode2v3
60-
*.perspectivev3
61-
*.xcuserstate
62-
project.xcworkspace/
63-
xcuserdata/
64-
65-
# Misc
66-
.DS_Store
67-
.DS_Store?
68-
*.DS_Store
69-
coverage.android.json
70-
coverage.ios.json
71-
coverage
72-
npm-debug.log
73-
.github
74-
._*
75-
.Spotlight-V100
76-
.Trashes
77-
ehthumbs.db
78-
Thumbs.dbandroid/gradle
79-
docs
80-
.idea
81-
tests/
82-
bin/test.js
83-
codorials
84-
.vscode
85-
.nyc_output
86-
.tmp
1+
__tests__

package.json

+25-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,15 @@
22
"name": "@react-native-community/netinfo",
33
"version": "2.0.0",
44
"description": "React Native Network Info API for iOS & Android",
5-
"main": "js/index.js",
6-
"typings": "typings/index.d.ts",
5+
"main": "lib/commonjs/index.js",
6+
"react-native": "js/index.js",
7+
"module": "lib/module/index.js",
8+
"types": "typings/index.d.ts",
9+
"files": [
10+
"/js",
11+
"/lib",
12+
"/typings"
13+
],
714
"author": "Matt Oakes <[email protected]>",
815
"contributors": [
916
"Mike Diarmid (Salakar) <[email protected]>"
@@ -29,7 +36,8 @@
2936
"test:detox:ios:bundle:release": "mkdir -p .tmp && react-native bundle --max-workers 4 --platform ios --dev false --entry-file example/index.js --bundle-output .tmp/ios-bundle.js",
3037
"test:detox:clean": "rimraf example/android/build && rimraf example/android/app/build && rimraf example/android/.gradle && rimraf example/ios/build",
3138
"ci:publish": "yarn semantic-release",
32-
"semantic-release": "semantic-release"
39+
"semantic-release": "semantic-release",
40+
"prepare": "bob build"
3341
},
3442
"keywords": [
3543
"react-native",
@@ -45,6 +53,7 @@
4553
"dependencies": {},
4654
"devDependencies": {
4755
"@babel/core": "^7.4.3",
56+
"@react-native-community/bob": "^0.3.3",
4857
"@react-native-community/eslint-config": "^0.0.3",
4958
"@semantic-release/git": "7.0.8",
5059
"babel-core": "^7.0.0-bridge.0",
@@ -102,5 +111,18 @@
102111
"repository": {
103112
"type": "git",
104113
"url": "https://github.com/react-native-community/react-native-netinfo.git"
114+
},
115+
"@react-native-community/bob": {
116+
"source": "js",
117+
"output": "lib",
118+
"targets": [
119+
[
120+
"commonjs",
121+
{
122+
"flow": true
123+
}
124+
],
125+
"module"
126+
]
105127
}
106128
}

0 commit comments

Comments
 (0)