Skip to content

Commit a3b9049

Browse files
authored
flatten the published directory (#6)
1 parent 32c20e6 commit a3b9049

File tree

4 files changed

+25
-12
lines changed

4 files changed

+25
-12
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ examples/RNUpdateCheckerExample/ios/Pods/
1212

1313
# production
1414
/build
15+
/dist
1516

1617
# misc
1718
/.DS_Store
@@ -22,4 +23,4 @@ examples/RNUpdateCheckerExample/ios/Pods/
2223

2324
npm-debug.log*
2425
yarn-debug.log*
25-
yarn-error.log*
26+
yarn-error.log*

.npmignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
/examples
1+
/examples
2+
src/**/*.test.js

babel.config.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
module.exports = {
2-
presets: ["module:metro-react-native-babel-preset"]
2+
presets: ["module:metro-react-native-babel-preset"],
3+
env: {
4+
production: {
5+
ignore: [
6+
"**/*.test.js"
7+
],
8+
sourceMaps: true
9+
}
10+
}
311
};

package.json

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
{
22
"name": "@hyperjumptech/universal-update-checker",
3-
"version": "0.0.2",
3+
"version": "0.0.3",
44
"description": "React component to check if there is a new version of the app",
5-
"main": "src/index.js",
6-
"files": [
7-
"src"
8-
],
5+
"main": "build/index.js",
6+
"files": ["build"],
97
"scripts": {
10-
"build": "rm -rf build && publish-flat -f src -o build && cd build && npm pack",
11-
"test": "jest src",
12-
"develop": "cd src && sync-glob --watch . ../examples/RNUpdateCheckerExample/node_modules/universal-update-checker"
8+
"build-module": "rm -rf build && rm -rf dist && NODE_ENV=production babel src --out-dir build && publish-flat -f build -o dist",
9+
"publish-module": "npm run build-module && cd dist && npm publish",
10+
"test": "jest src"
1311
},
1412
"repository": {
1513
"type": "git",
@@ -30,7 +28,12 @@
3028
},
3129
"jest": {
3230
"preset": "react-native",
33-
"testEnvironment": "jsdom"
31+
"testEnvironment": "jsdom",
32+
"testPathIgnorePatterns": [
33+
"<rootDir>/build/",
34+
"<rootDir>/dist/",
35+
"<rootDir>/node_modules/"
36+
]
3437
},
3538
"devDependencies": {
3639
"@babel/cli": "^7.5.5",

0 commit comments

Comments
 (0)