create-react-native-library 0.57.2 → 0.58.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/lib/constants.js +4 -3
  2. package/lib/constants.js.map +1 -1
  3. package/lib/exampleApp/generateExampleApp.js +18 -13
  4. package/lib/exampleApp/generateExampleApp.js.map +1 -1
  5. package/lib/inform.js +1 -1
  6. package/lib/inform.js.map +1 -1
  7. package/lib/prompt.js +21 -10
  8. package/lib/prompt.js.map +1 -1
  9. package/lib/template.js +34 -5
  10. package/lib/template.js.map +1 -1
  11. package/lib/utils/configureTools.js +73 -105
  12. package/lib/utils/configureTools.js.map +1 -1
  13. package/package.json +22 -22
  14. package/templates/common/$.github/workflows/ci.yml +6 -4
  15. package/templates/common/$package.json +4 -4
  16. package/templates/common/CONTRIBUTING.md +9 -5
  17. package/templates/common/README.md +1 -11
  18. package/templates/js-library/src/index.tsx +1 -3
  19. package/templates/js-library/src/multiply.tsx +3 -0
  20. package/templates/js-view/src/index.tsx +1 -0
  21. package/templates/js-view/src/{%- project.name %}View.tsx +9 -0
  22. package/templates/native-library-new/src/index.tsx +1 -5
  23. package/templates/native-library-new/src/multiply.native.tsx +5 -0
  24. package/templates/native-library-new/src/multiply.tsx +5 -0
  25. package/templates/native-view-new/src/index.tsx +1 -2
  26. package/templates/native-view-new/src/{%- project.name %}View.native.tsx +2 -0
  27. package/templates/native-view-new/src/{%- project.name %}View.tsx +11 -0
  28. package/templates/nitro-common/nitro.json +8 -2
  29. package/templates/nitro-module/src/index.tsx +1 -9
  30. package/templates/nitro-module/src/multiply.native.tsx +9 -0
  31. package/templates/nitro-module/src/multiply.tsx +5 -0
  32. package/templates/nitro-module/src/{%- project.name %}.nitro.ts +4 -2
  33. package/templates/nitro-view/src/index.tsx +1 -11
  34. package/templates/nitro-view/src/{%- project.name %}View.native.tsx +11 -0
  35. package/templates/nitro-view/src/{%- project.name %}View.tsx +11 -0
  36. package/templates/tools/eslint/~package.json +23 -0
  37. package/templates/tools/jest/src/__tests__/index.test.tsx +2 -0
  38. package/templates/tools/jest/~package.json +16 -0
  39. package/templates/tools/lefthook/~package.json +10 -0
  40. package/templates/tools/release-it/~package.json +28 -0
  41. package/templates/tools/turborepo/~package.json +5 -0
  42. package/templates/tools/vite/example/index.html +25 -0
  43. package/templates/tools/vite/example/index.js +11 -0
  44. package/templates/tools/vite/example/vite.config.mjs +15 -0
  45. package/templates/tools/vite/example/~package.json +14 -0
  46. package/templates/tools/vite/~package.json +9 -0
  47. /package/templates/{native-common-example → example-bare}/example/babel.config.js +0 -0
  48. /package/templates/{native-common-example → example-bare}/example/index.js +0 -0
  49. /package/templates/{native-common-example → example-native-common}/example/react-native.config.js +0 -0
@@ -0,0 +1,16 @@
1
+ {
2
+ "scripts": {
3
+ "test": "jest"
4
+ },
5
+ "jest": {
6
+ "preset": "react-native",
7
+ "modulePathIgnorePatterns": [
8
+ "<rootDir>/example/node_modules",
9
+ "<rootDir>/lib/"
10
+ ]
11
+ },
12
+ "devDependencies": {
13
+ "@jest/globals": "^30.0.0",
14
+ "jest": "^30.3.0"
15
+ }
16
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "commitlint": {
3
+ "extends": ["@commitlint/config-conventional"]
4
+ },
5
+ "devDependencies": {
6
+ "@commitlint/config-conventional": "^20.5.0",
7
+ "commitlint": "^20.5.0",
8
+ "lefthook": "^2.1.4"
9
+ }
10
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "scripts": {
3
+ "release": "release-it --only-version"
4
+ },
5
+ "release-it": {
6
+ "git": {
7
+ "commitMessage": "chore: release ${version}",
8
+ "tagName": "v${version}"
9
+ },
10
+ "npm": {
11
+ "publish": true
12
+ },
13
+ "github": {
14
+ "release": true
15
+ },
16
+ "plugins": {
17
+ "@release-it/conventional-changelog": {
18
+ "preset": {
19
+ "name": "angular"
20
+ }
21
+ }
22
+ }
23
+ },
24
+ "devDependencies": {
25
+ "@release-it/conventional-changelog": "^10.0.6",
26
+ "release-it": "^19.2.4"
27
+ }
28
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "devDependencies": {
3
+ "turbo": "^2.8.21"
4
+ }
5
+ }
@@ -0,0 +1,25 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta
6
+ name="viewport"
7
+ content="width=device-width, initial-scale=1, shrink-to-fit=no"
8
+ />
9
+ <style>
10
+ html,
11
+ body {
12
+ height: 100%;
13
+ }
14
+
15
+ #root {
16
+ display: flex;
17
+ height: 100%;
18
+ }
19
+ </style>
20
+ </head>
21
+ <body>
22
+ <div id="root"></div>
23
+ <script type="module" src="./index.js"></script>
24
+ </body>
25
+ </html>
@@ -0,0 +1,11 @@
1
+ import { AppRegistry } from 'react-native';
2
+ import App from './src/App';
3
+ import { name as appName } from './app.json';
4
+
5
+ AppRegistry.registerComponent(appName, () => App);
6
+
7
+ if (typeof document !== 'undefined') {
8
+ AppRegistry.runApplication(appName, {
9
+ rootTag: document.getElementById('root'),
10
+ });
11
+ }
@@ -0,0 +1,15 @@
1
+ import { defineConfig, mergeConfig } from 'vite';
2
+
3
+ import config from 'react-native-builder-bob/vite-config';
4
+ import pack from '../package.json' with { type: 'json' };
5
+
6
+ export default defineConfig((env) =>
7
+ mergeConfig(config(env), {
8
+ resolve: {
9
+ alias: {
10
+ '<%- project.slug -%>': new URL('..', import.meta.url),
11
+ },
12
+ dedupe: Object.keys(pack.peerDependencies),
13
+ },
14
+ })
15
+ );
@@ -0,0 +1,14 @@
1
+ {
2
+ "scripts": {
3
+ "web": "vite",
4
+ "build:web": "vite build"
5
+ },
6
+ "dependencies": {
7
+ "react-native-web": "~0.21.1"
8
+ },
9
+ "devDependencies": {
10
+ "@vitejs/plugin-react": "^5.0.0",
11
+ "vite": "^7.1.1",
12
+ "vite-plugin-commonjs": "^0.10.4"
13
+ }
14
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "scripts": {
3
+ "web": "vite",
4
+ "build:web": "vite build"
5
+ },
6
+ "devDependencies": {
7
+ "react-native-web": "~0.21.1"
8
+ }
9
+ }