-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
React-Native & Expo support for alternative workspace.packages folders (
#4) * new wrapper bp-request * removed expo/metro-config from rnative * minor refactor in metro.config.js * support for extra folder * update xpo project to use simiilar config
- Loading branch information
Enrico Valbuena
authored
Dec 24, 2021
1 parent
bbe68bc
commit 8eb897c
Showing
14 changed files
with
121 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## Purpose | ||
|
||
This folder in the monorepo contains libraries which are to be built before being used. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
## Wrappers | ||
|
||
- This folder in the monorepo contains libraries which do not need to be built before being used. | ||
- Wrapper libraries are libraries that "wrap" around a third party library like stripe, sendGrid, twilio, axios, etc. | ||
- This is so that if the third party library requirements change, you only need to change the third party library in a few places as opposed to all your mono repo applications. | ||
- These libraries should have no other monorepo package dependencies. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require("scripts/eslint-preset"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"name": "bp-request", | ||
"version": "1.0.0", | ||
"main": "./dist/index.js", | ||
"module": "./dist/index.mjs", | ||
"types": "./dist/index.d.ts", | ||
"sideEffects": false, | ||
"private": true, | ||
"license": "MIT", | ||
"files": [ | ||
"dist/**" | ||
], | ||
"scripts": { | ||
"test": "jest -u", | ||
"build": "tsup src/index.ts --format esm,cjs --dts --external axios", | ||
"dev": "tsup src/index.ts --format esm,cjs --watch --dts --external axios", | ||
"lint": "TIMING=1 eslint src --fix", | ||
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist" | ||
}, | ||
"devDependencies": { | ||
"axios": "0.24.0", | ||
"tsup": "^5.10.1", | ||
"typescript": "^4.2.4" | ||
}, | ||
"jest": { | ||
"preset": "scripts/jest/node" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import axios from "axios"; | ||
|
||
const get = async <P = null, T = any>( | ||
url: string, | ||
headers?: { [key: string]: string } | ||
): Promise<T> => { | ||
const result = await axios.get<P, T>(url, { | ||
headers, | ||
}); | ||
|
||
return result; | ||
}; | ||
|
||
export { get }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"extends": "tsconfig/base.json", | ||
"compilerOptions": { | ||
"moduleResolution": "node", | ||
"jsx": "react-jsx", | ||
"lib": ["ES2015"], | ||
"target": "ES6", | ||
"module": "ESNext", | ||
"outDir": "./dist", | ||
"rootDir": "./src" | ||
}, | ||
"include": ["src"], | ||
"exclude": ["node_modules", "src/__test__/**/*"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters