Skip to content

Commit 6c90ece

Browse files
committed
feat: sets up lcdev react-native alias
1 parent 34029c8 commit 6c90ece

File tree

13 files changed

+82
-9
lines changed

13 files changed

+82
-9
lines changed

.github/workflows/publishing.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ jobs:
7676
token: ${{ secrets.NPM_TOKEN }}
7777
access: public
7878
package: ./app-config-lcdev-main/package.json
79+
- uses: JS-DevTools/npm-publish@v1
80+
with:
81+
token: ${{ secrets.NPM_TOKEN }}
82+
access: public
83+
package: ./app-config-lcdev-react-native/package.json
7984
- uses: JS-DevTools/npm-publish@v1
8085
with:
8186
token: ${{ secrets.NPM_TOKEN }}

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,4 @@ If you are adding anything new or changing behavior, please add applicable tests
5555
- `@lcdev/app-config`: alias for `@app-config/main`
5656
- `@lcdev/app-config-webpack-plugin`: alias for `@app-config/webpack`
5757
- `@lcdev/app-config-inject`: alias for `@app-config/inject`
58+
- `@lcdev/react-native-app-config-transformer`: alias for `@app-config/inject`
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('@lcdev/eslint-config/cwd')(__dirname);
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
## App Config React Native
2+
3+
This is a package that re-exports `@app-config/react-native`, maintained for backwards compatibility.
4+
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"name": "@lcdev/react-native-app-config-transformer",
3+
"description": "Alias for @app-config/react-native",
4+
"version": "2.1.2",
5+
"license": "MPL-2.0",
6+
"author": {
7+
"name": "Launchcode",
8+
"email": "[email protected]",
9+
"url": "https://lc.dev"
10+
},
11+
"repository": {
12+
"type": "git",
13+
"url": "https://github.com/launchcodedev/app-config.git"
14+
},
15+
"main": "dist/index.js",
16+
"module": "dist/es/index.js",
17+
"types": "dist/index.d.ts",
18+
"files": [
19+
"/dist",
20+
"!**/*.tsbuildinfo",
21+
"!**/*.test.*"
22+
],
23+
"scripts": {
24+
"build": "tsc -b",
25+
"build:es": "tsc -b tsconfig.es.json",
26+
"clean": "rm -rf dist *.tsbuildinfo",
27+
"lint": "eslint src",
28+
"fix": "eslint --fix src",
29+
"test": "jest",
30+
"prepublishOnly": "yarn clean && yarn build && yarn build:es"
31+
},
32+
"dependencies": {
33+
"@app-config/react-native": "2"
34+
},
35+
"devDependencies": {},
36+
"prettier": "@lcdev/prettier",
37+
"jest": {
38+
"preset": "@lcdev/jest"
39+
}
40+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from '@app-config/react-native';
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"target": "es2020",
5+
"module": "es2020",
6+
"outDir": "./dist/es"
7+
}
8+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"extends": "@lcdev/tsconfig",
3+
"compilerOptions": {
4+
"rootDir": "./src",
5+
"outDir": "./dist"
6+
},
7+
"include": ["src"],
8+
"exclude": ["node_modules"],
9+
"references": [
10+
{ "path": "../app-config-test-utils" },
11+
{ "path": "../app-config-react-native-transformer" }
12+
]
13+
}

app-config-react-native-transformer/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ Or, if you use NPM.
1616
npm i @app-config/main
1717
```
1818

19-
### 2. Install `@lcdev/react-native-app-config-transformer`
19+
### 2. Install `@app-config/react-native`
2020

2121
```shell
22-
yarn add -D @lcdev/react-native-app-config-transformer
22+
yarn add -D @app-config/react-native
2323
```
2424

2525
Or, if you use NPM.
2626

2727
```shell
28-
npm i -D @lcdev/react-native-app-config-transformer
28+
npm i -D @app-config/react-native
2929
```
3030

3131
### 3. Configure React Native bundler (Metro)
@@ -39,7 +39,7 @@ module.exports = {
3939
// Force cache reset in order to load app-config changes
4040
resetCache: true,
4141
transformer: {
42-
babelTransformerPath: require.resolve('@lcdev/react-native-app-config-transformer'),
42+
babelTransformerPath: require.resolve('@app-config/react-native'),
4343
},
4444
};
4545
```

app-config-react-native-transformer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@lcdev/react-native-app-config-transformer",
2+
"name": "@app-config/react-native",
33
"description": "React Native Metro transformer that loads your app-config values into bundles statically",
44
"version": "2.1.2",
55
"license": "MPL-2.0",

0 commit comments

Comments
 (0)