From cd4fa1bd8e7e15eed8c0a0923b6069af65cffe7a Mon Sep 17 00:00:00 2001 From: Kalash Shah <81062983+kalashshah@users.noreply.github.com> Date: Fri, 22 Mar 2024 19:24:21 +0530 Subject: [PATCH] chore: add rn sdks to nx console for deployment (#1183) --- packages/reactnative/.eslintignore | 3 ++ packages/reactnative/package.json | 3 +- packages/reactnative/project.json | 54 +------------------ .../reactnative/src/__tests__/index.test.tsx | 1 - packages/uireactnative/package.json | 6 ++- packages/uireactnative/project.json | 7 +++ workspace.json | 4 +- 7 files changed, 20 insertions(+), 58 deletions(-) create mode 100644 packages/reactnative/.eslintignore delete mode 100644 packages/reactnative/src/__tests__/index.test.tsx create mode 100644 packages/uireactnative/project.json diff --git a/packages/reactnative/.eslintignore b/packages/reactnative/.eslintignore new file mode 100644 index 000000000..e3d0fd182 --- /dev/null +++ b/packages/reactnative/.eslintignore @@ -0,0 +1,3 @@ +node_modules/ +lib/ +shim.js diff --git a/packages/reactnative/package.json b/packages/reactnative/package.json index d919016d6..8fce12eec 100644 --- a/packages/reactnative/package.json +++ b/packages/reactnative/package.json @@ -40,9 +40,10 @@ "!**/.*" ], "scripts": { - "test": "jest", + "test": "jest --bail=false --passWithNoTests", "typecheck": "tsc --noEmit", "lint": "eslint \"**/*.{js,ts,tsx}\"", + "build": "bob build", "prepare": "bob build", "release": "release-it", "bootstrap": "yarn install", diff --git a/packages/reactnative/project.json b/packages/reactnative/project.json index 3ff33e792..a1da0516f 100644 --- a/packages/reactnative/project.json +++ b/packages/reactnative/project.json @@ -3,57 +3,5 @@ "sourceRoot": "packages/reactnative/src", "projectType": "library", "tags": [], - "targets": { - "build": { - "executor": "@nrwl/web:rollup", - "outputs": ["{options.outputPath}"], - "options": { - "outputPath": "dist/packages/reactnative", - "tsConfig": "packages/reactnative/tsconfig.lib.json", - "project": "packages/reactnative/package.json", - "entryFile": "packages/reactnative/src/index.ts", - "external": ["react/jsx-runtime", "react-native"], - "rollupConfig": [ - "@nrwl/react/plugins/bundle-rollup", - "packages/reactnative/rollup.config.cjs" - ], - "assets": [ - { - "glob": "packages/reactnative/README.md", - "input": ".", - "output": "." - }, - { - "glob": "packages/reactnative/src/lib/assets/*.*", - "input": ".", - "output": "lib/assets" - } - ], - "format": ["esm", "cjs"], - "updateBuildableProjectDepsInPackageJson": true, - "buildableProjectDepsInPackageJsonType": "dependencies" - } - }, - "lint": { - "executor": "@nrwl/linter:eslint", - "outputs": ["{options.outputFile}"], - "options": { - "lintFilePatterns": ["packages/reactnative/**/*.{ts,tsx,js,jsx}"] - } - }, - "ci-version": { - "executor": "@jscutlery/semver:version", - "options": { - "preset": "angular", - "commitMessageFormat": "ci(${projectName}): 🎉 cut release to ${projectName}-v${version}", - "postTargets": ["reactnative:build", "reactnative:ci-publish"] - } - }, - "ci-publish": { - "executor": "@nrwl/workspace:run-commands", - "options": { - "command": "node tools/scripts/publish.mjs reactnative" - } - } - } + "targets": {} } diff --git a/packages/reactnative/src/__tests__/index.test.tsx b/packages/reactnative/src/__tests__/index.test.tsx deleted file mode 100644 index aa3ef72ad..000000000 --- a/packages/reactnative/src/__tests__/index.test.tsx +++ /dev/null @@ -1 +0,0 @@ -it('todo: write a test', async () => {}); diff --git a/packages/uireactnative/package.json b/packages/uireactnative/package.json index 678a03dee..ce1fd903a 100644 --- a/packages/uireactnative/package.json +++ b/packages/uireactnative/package.json @@ -25,10 +25,11 @@ "!**/.*" ], "scripts": { - "test": "jest", + "test": "jest --bail=false --passWithNoTests", "typecheck": "tsc --noEmit", - "lint": "eslint \"**/*.{js,ts,tsx}\"", + "lint": "eslint \"**/*.{js,ts,tsx}\" --ignore-pattern 'node_modules, /lib/*'", "prepare": "bob build", + "build": "bob build", "release": "release-it" }, "keywords": [ @@ -40,6 +41,7 @@ "registry": "https://registry.npmjs.org/" }, "devDependencies": { + "@react-native/babel-preset": "^0.75.0-main", "@react-native/eslint-config": "^0.72.2", "@release-it/conventional-changelog": "^5.0.0", "@types/jest": "^28.1.2", diff --git a/packages/uireactnative/project.json b/packages/uireactnative/project.json new file mode 100644 index 000000000..301472f96 --- /dev/null +++ b/packages/uireactnative/project.json @@ -0,0 +1,7 @@ +{ + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "sourceRoot": "packages/uireactnative/src", + "projectType": "library", + "tags": [], + "targets": {} +} diff --git a/workspace.json b/workspace.json index 8f790ddab..fce857679 100644 --- a/workspace.json +++ b/workspace.json @@ -8,6 +8,8 @@ "restapi": "packages/restapi", "socket": "packages/socket", "uiembed": "packages/uiembed", - "uiweb": "packages/uiweb" + "uiweb": "packages/uiweb", + "react-native-sdk": "packages/reactnative", + "uireactnative": "packages/uireactnative" } }