Skip to content

Commit e4640fc

Browse files
author
Krzysztof Borowy
committed
build: use bob to comply with web target
1 parent e315614 commit e4640fc

File tree

8 files changed

+1139
-29
lines changed

8 files changed

+1139
-29
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ project.xcworkspace
2525

2626
# Android/IntelliJ
2727
#
28-
build/
2928
.idea
3029
.gradle
3130
local.properties
3231
*.iml
32+
android/build
3333
android/gradle/
3434
android/gradlew
3535
android/gradlew.bat
@@ -49,3 +49,6 @@ buck-out/
4949
.vscode
5050
.expo
5151
/web-build
52+
53+
# builds by bob
54+
lib/

.npmignore

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,17 @@ yarn.lock
44

55
# Project files
66
CONTRIBUTING.md
7-
CODE_OF_CONDUCT.md
87
README.md
98

109
# Config files
11-
.babelrc
1210
babel.config.js
13-
.editorconfig
1411
.eslintrc
1512
.flowconfig
1613
.watchmanconfig
17-
jsconfig.json
1814
.npmrc
19-
.gitattributes
2015
.circleci
2116
*.coverage.json
2217
.opensource
23-
.circleci
24-
.eslintignore
2518
codecov.yml
2619

2720
# Scripts
@@ -70,10 +63,8 @@ ios/build/
7063
# Misc
7164
.DS_Store
7265
.DS_Store?
73-
*.DS_Store
7466
coverage.android.json
7567
coverage.ios.json
76-
coverage
7768
npm-debug.log
7869
.github
7970
._*
@@ -83,8 +74,5 @@ ehthumbs.db
8374
Thumbs.dbandroid/gradle
8475
docs
8576
.idea
86-
tests/
8777
bin/test.js
8878
codorials
89-
.vscode
90-
.nyc_output

package.json

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,23 @@
22
"name": "@react-native-community/async-storage",
33
"version": "1.10.0",
44
"description": "Asynchronous, persistent, key-value storage system for React Native.",
5+
"main": "lib/commonjs/index.js",
6+
"module": "lib/module/index.js",
7+
"react-native": "src/index.js",
58
"types": "./types/index.d.ts",
6-
"main": "./lib/index.js",
7-
"author": "Krzysztof Borowy <krizzu.dev@gmail.com>",
9+
"files": [
10+
"lib/",
11+
"src/",
12+
"jest/",
13+
"types/",
14+
"android/src",
15+
"android/build.gradle",
16+
"ios/",
17+
"macos/",
18+
"window/",
19+
"RNCAsyncStorage.podspec"
20+
],
21+
"author": "Krzysztof Borowy <hello@krizzu.dev>",
822
"contributors": [
923
"Evan Bacon <bacon@expo.io> (https://github.com/evanbacon)"
1024
],
@@ -22,6 +36,7 @@
2236
"url": "https://github.com/react-native-community/react-native-async-storage.git"
2337
},
2438
"scripts": {
39+
"prepare": "bob build",
2540
"start": "node node_modules/react-native/local-cli/cli.js start",
2641
"start:android": "react-native run-android --root example/",
2742
"start:ios": "react-native run-ios --project-path example/ios --scheme AsyncStorageExample",
@@ -33,7 +48,7 @@
3348
"build:e2e:macos": "scripts/run_macos_e2e.sh 'build'",
3449
"test": "yarn test:lint && yarn test:flow",
3550
"test:flow": "flow check",
36-
"test:lint": "eslint 'lib/**/*.js' 'example/**/*.js'",
51+
"test:lint": "eslint 'src/**/*.js' 'example/**/*.js' 'jest/*.js'",
3752
"test:e2e:ios": "detox test -c ios",
3853
"test:e2e:android": "detox test -c android",
3954
"test:e2e:macos": "scripts/run_macos_e2e.sh 'test'"
@@ -48,6 +63,7 @@
4863
"devDependencies": {
4964
"@babel/core": "^7.6.2",
5065
"@babel/runtime": "^7.6.2",
66+
"@react-native-community/bob": "^0.14.0",
5167
"@react-native-community/cli": "^3.1.0",
5268
"@react-native-community/cli-platform-android": "^3.1.0",
5369
"@react-native-community/cli-platform-ios": "^3.1.0",
@@ -92,5 +108,13 @@
92108
"name": "Emu_E2E"
93109
}
94110
}
111+
},
112+
"@react-native-community/bob": {
113+
"source": "src",
114+
"output": "lib",
115+
"targets": [
116+
"commonjs",
117+
"module"
118+
]
95119
}
96120
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)