create-crossbind 2.0.0-beta.60 → 2.0.0-beta.62
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.
- package/package.json +1 -1
- package/src/dotfiles.js +22 -0
- package/src/index.js +2 -0
- package/templates/backend-nodejs-wasm/_gitignore +3 -0
- package/templates/backend-nodejs-wasm/_npmignore +2 -0
- package/templates/backend-nodejs-wasm/package.json +2 -2
- package/templates/cloud-cloudflare-worker/_gitignore +6 -0
- package/templates/cloud-cloudflare-worker/package.json +1 -1
- package/templates/lib-cmake/_gitignore +4 -0
- package/templates/lib-cmake/package.json +1 -1
- package/templates/lib-prebuilt/_gitignore +4 -0
- package/templates/lib-prebuilt/_npmignore +7 -0
- package/templates/lib-prebuilt/package.json +3 -2
- package/templates/lib-source/_gitignore +4 -0
- package/templates/lib-source/package.json +1 -1
- package/templates/mobile-reactnative-cli/_gitignore +90 -0
- package/templates/mobile-reactnative-cli/ci/crossbind-snapshot/cache.json +2 -2
- package/templates/mobile-reactnative-cli/package.json +7 -7
- package/templates/mobile-reactnative-expo/_gitignore +46 -0
- package/templates/mobile-reactnative-expo/package-lock.json +126 -676
- package/templates/mobile-reactnative-expo/package.json +6 -6
- package/templates/web-react-rspack/_gitignore +17 -0
- package/templates/web-react-rspack/package.json +3 -3
- package/templates/web-react-vite/_gitignore +28 -0
- package/templates/web-react-vite/package.json +2 -2
- package/templates/web-svelte-vite/_gitignore +28 -0
- package/templates/web-svelte-vite/package.json +2 -2
- package/templates/web-vanilla/_gitignore +5 -0
- package/templates/web-vanilla/package.json +2 -2
- package/templates/web-vue-vite/_gitignore +29 -0
- package/templates/web-vue-vite/package.json +2 -2
package/package.json
CHANGED
package/src/dotfiles.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import fsp from 'node:fs/promises';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
|
|
5
|
+
// npm leaves every .gitignore and .npmignore out of a published tarball, so a template also
|
|
6
|
+
// carries a copy under these names, which the scaffolder restores. The originals must stay:
|
|
7
|
+
// npm applies their rules while packing, which keeps a sample's untracked build output out.
|
|
8
|
+
const PACKED_NAMES = [
|
|
9
|
+
['.gitignore', '_gitignore'],
|
|
10
|
+
['.npmignore', '_npmignore'],
|
|
11
|
+
];
|
|
12
|
+
|
|
13
|
+
async function forEachPresent(dir, pairs, operation) {
|
|
14
|
+
for (const [from, to] of pairs) {
|
|
15
|
+
const file = path.join(dir, from);
|
|
16
|
+
if (fs.existsSync(file)) await operation(file, path.join(dir, to));
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const packDotfiles = (dir) => forEachPresent(dir, PACKED_NAMES, fsp.copyFile);
|
|
21
|
+
|
|
22
|
+
export const unpackDotfiles = (dir) => forEachPresent(dir, PACKED_NAMES.map(([name, packed]) => [packed, name]), fsp.rename);
|
package/src/index.js
CHANGED
|
@@ -5,6 +5,7 @@ import path from 'node:path';
|
|
|
5
5
|
import { fileURLToPath } from 'node:url';
|
|
6
6
|
import { styleText } from 'node:util';
|
|
7
7
|
import * as p from '@clack/prompts';
|
|
8
|
+
import { unpackDotfiles } from './dotfiles.js';
|
|
8
9
|
import { pkgManager } from './utils.js';
|
|
9
10
|
|
|
10
11
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
@@ -150,6 +151,7 @@ async function main() {
|
|
|
150
151
|
spin.start(`Scaffolding ${entry.key}`);
|
|
151
152
|
await fsp.mkdir(cwd, { recursive: true });
|
|
152
153
|
await fsp.cp(src, cwd, { recursive: true });
|
|
154
|
+
await unpackDotfiles(cwd);
|
|
153
155
|
|
|
154
156
|
const pjPath = path.join(cwd, 'package.json');
|
|
155
157
|
let scripts = {};
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
"build": "crossbind build -p wasm -a wasm32 -r st -e node -b release"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@crossbind/example-lib-prebuilt-matrix": "^2.0.0-beta.
|
|
13
|
+
"@crossbind/example-lib-prebuilt-matrix": "^2.0.0-beta.62"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"crossbind": "^2.0.0-beta.
|
|
16
|
+
"crossbind": "^2.0.0-beta.62"
|
|
17
17
|
},
|
|
18
18
|
"keywords": [
|
|
19
19
|
"crossbind-sample",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crossbind/example-lib-cmake",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.62",
|
|
4
4
|
"description": "crossbind sample library: simple cmake library",
|
|
5
5
|
"homepage": "https://github.com/crossbind/crossbind/tree/main/examples/lib-cmake#readme",
|
|
6
6
|
"repository": "https://github.com/crossbind/crossbind.git",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crossbind/example-lib-prebuilt-matrix",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.62",
|
|
4
4
|
"description": "crossbind sample prebuilt library: matrix multiplier",
|
|
5
5
|
"homepage": "https://github.com/crossbind/crossbind/tree/main/examples/lib-prebuilt-matrix#readme",
|
|
6
6
|
"repository": "https://github.com/crossbind/crossbind.git",
|
|
@@ -12,11 +12,12 @@
|
|
|
12
12
|
"build:wasm": "crossbind build -p wasm",
|
|
13
13
|
"build:android": "crossbind build -p android",
|
|
14
14
|
"build:ios": "crossbind build -p ios",
|
|
15
|
+
"build:darwin": "crossbind build -p darwin",
|
|
15
16
|
"clear": "rm -rf .crossbind dist *.xcframework",
|
|
16
17
|
"prepublishOnly": "crossbind build"
|
|
17
18
|
},
|
|
18
19
|
"devDependencies": {
|
|
19
|
-
"crossbind": "^2.0.0-beta.
|
|
20
|
+
"crossbind": "^2.0.0-beta.62"
|
|
20
21
|
},
|
|
21
22
|
"keywords": [
|
|
22
23
|
"crossbind-sample",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crossbind/example-lib-source",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.62",
|
|
4
4
|
"description": "crossbind sample library: simple source library",
|
|
5
5
|
"homepage": "https://github.com/crossbind/crossbind/tree/main/examples/lib-source#readme",
|
|
6
6
|
"repository": "https://github.com/crossbind/crossbind.git",
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
.crossbind
|
|
2
|
+
.yarn
|
|
3
|
+
ios/build
|
|
4
|
+
android/build
|
|
5
|
+
android/app/build
|
|
6
|
+
android/app/.cxx
|
|
7
|
+
|
|
8
|
+
# OSX
|
|
9
|
+
#
|
|
10
|
+
.DS_Store
|
|
11
|
+
|
|
12
|
+
# Xcode
|
|
13
|
+
#
|
|
14
|
+
build/
|
|
15
|
+
*.pbxuser
|
|
16
|
+
!default.pbxuser
|
|
17
|
+
*.mode1v3
|
|
18
|
+
!default.mode1v3
|
|
19
|
+
*.mode2v3
|
|
20
|
+
!default.mode2v3
|
|
21
|
+
*.perspectivev3
|
|
22
|
+
!default.perspectivev3
|
|
23
|
+
xcuserdata
|
|
24
|
+
*.xccheckout
|
|
25
|
+
*.moved-aside
|
|
26
|
+
DerivedData
|
|
27
|
+
*.hmap
|
|
28
|
+
*.ipa
|
|
29
|
+
*.xcuserstate
|
|
30
|
+
**/.xcode.env.local
|
|
31
|
+
|
|
32
|
+
# Android/IntelliJ
|
|
33
|
+
#
|
|
34
|
+
build/
|
|
35
|
+
.idea
|
|
36
|
+
.gradle
|
|
37
|
+
local.properties
|
|
38
|
+
*.iml
|
|
39
|
+
*.hprof
|
|
40
|
+
.cxx/
|
|
41
|
+
*.keystore
|
|
42
|
+
!debug.keystore
|
|
43
|
+
android/app/build
|
|
44
|
+
|
|
45
|
+
# node.js
|
|
46
|
+
#
|
|
47
|
+
node_modules/
|
|
48
|
+
npm-debug.log
|
|
49
|
+
yarn-error.log
|
|
50
|
+
|
|
51
|
+
# fastlane
|
|
52
|
+
#
|
|
53
|
+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
|
|
54
|
+
# screenshots whenever they are needed.
|
|
55
|
+
# For more information about the recommended setup visit:
|
|
56
|
+
# https://docs.fastlane.tools/best-practices/source-control/
|
|
57
|
+
|
|
58
|
+
**/fastlane/report.xml
|
|
59
|
+
**/fastlane/Preview.html
|
|
60
|
+
**/fastlane/screenshots
|
|
61
|
+
**/fastlane/test_output
|
|
62
|
+
|
|
63
|
+
# Bundle artifact
|
|
64
|
+
*.jsbundle
|
|
65
|
+
|
|
66
|
+
# Ruby / CocoaPods
|
|
67
|
+
**/Pods/
|
|
68
|
+
/vendor/bundle/
|
|
69
|
+
|
|
70
|
+
# Temporary files created by Metro to check the health of the file watcher
|
|
71
|
+
.metro-health-check*
|
|
72
|
+
|
|
73
|
+
# testing
|
|
74
|
+
/coverage
|
|
75
|
+
|
|
76
|
+
# Yarn
|
|
77
|
+
.yarn/*
|
|
78
|
+
!.yarn/patches
|
|
79
|
+
!.yarn/plugins
|
|
80
|
+
!.yarn/releases
|
|
81
|
+
!.yarn/sdks
|
|
82
|
+
!.yarn/versions
|
|
83
|
+
|
|
84
|
+
# crossbind: generated runtime assets (copied dependency data + stamp)
|
|
85
|
+
android/app/src/main/assets/crossbind/
|
|
86
|
+
|
|
87
|
+
# CI bridge snapshot: committed on purpose (the iOS workflow restores it before pod install to
|
|
88
|
+
# skip SWIG generation), so re-include it past the generic build/ rule above.
|
|
89
|
+
!ci/crossbind-snapshot
|
|
90
|
+
!ci/crossbind-snapshot/build
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"hashes": {
|
|
3
|
-
"/Users/runner/work/crossbind/crossbind/examples/mobile-reactnative-cli/src/native/native.h": "swig-macros-1\nd105082c6e8c8652ea461e161c501e824b6b625f7b819490102c5c0699744249",
|
|
4
|
-
"/Users/runner/work/crossbind/crossbind/examples/mobile-reactnative-cli/.crossbind/build/interface/native.i": "
|
|
3
|
+
"/Users/runner/work/crossbind/crossbind/examples/mobile-reactnative-cli/src/native/native.h": "swig-macros-1\nd105082c6e8c8652ea461e161c501e824b6b625f7b819490102c5c0699744249\nconstants:Native",
|
|
4
|
+
"/Users/runner/work/crossbind/crossbind/examples/mobile-reactnative-cli/.crossbind/build/interface/native.i": "swig-constants-1\nd2951a720fdd54191e27157df067c64d7d7839b41c14494d63aef4f3a4eae3a2\nd105082c6e8c8652ea461e161c501e824b6b625f7b819490102c5c0699744249"
|
|
5
5
|
},
|
|
6
6
|
"interfaces": {
|
|
7
7
|
"/Users/runner/work/crossbind/crossbind/examples/mobile-reactnative-cli/src/native/native.h": "/Users/runner/work/crossbind/crossbind/examples/mobile-reactnative-cli/.crossbind/build/interface/native.i"
|
|
@@ -20,17 +20,17 @@
|
|
|
20
20
|
"e2e:android": "pnpm run run:android && pnpm run maestro:android"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@crossbind/core-embind-jsi": "^2.0.0-beta.
|
|
24
|
-
"@crossbind/plugin-react-native": "^2.0.0-beta.
|
|
25
|
-
"@crossbind/plugin-react-native-ios-helper": "^2.0.0-beta.
|
|
26
|
-
"@crossbind/example-lib-prebuilt-matrix": "^2.0.0-beta.
|
|
23
|
+
"@crossbind/core-embind-jsi": "^2.0.0-beta.62",
|
|
24
|
+
"@crossbind/plugin-react-native": "^2.0.0-beta.62",
|
|
25
|
+
"@crossbind/plugin-react-native-ios-helper": "^2.0.0-beta.62",
|
|
26
|
+
"@crossbind/example-lib-prebuilt-matrix": "^2.0.0-beta.62",
|
|
27
27
|
"react": "19.3.0",
|
|
28
28
|
"react-native": "0.87.1",
|
|
29
29
|
"react-native-safe-area-context": "^5.8.0",
|
|
30
30
|
"hermes-compiler": "*"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@babel/core": "^
|
|
33
|
+
"@babel/core": "^7.29.7",
|
|
34
34
|
"@babel/preset-env": "^7.29.7",
|
|
35
35
|
"@babel/runtime": "^7.29.7",
|
|
36
36
|
"@react-native-community/cli": "20.2.0",
|
|
@@ -46,12 +46,12 @@
|
|
|
46
46
|
"@types/jest": "^29.5.13",
|
|
47
47
|
"@types/react": "^19.3.0",
|
|
48
48
|
"@types/react-test-renderer": "^19.3.0",
|
|
49
|
-
"eslint": "^
|
|
49
|
+
"eslint": "^8.19.0",
|
|
50
50
|
"jest": "^29.6.3",
|
|
51
51
|
"prettier": "3.9.8",
|
|
52
52
|
"react-test-renderer": "19.3.0",
|
|
53
53
|
"typescript": "^5.8.3",
|
|
54
|
-
"@crossbind/plugin-metro": "^2.0.0-beta.
|
|
54
|
+
"@crossbind/plugin-metro": "^2.0.0-beta.62"
|
|
55
55
|
},
|
|
56
56
|
"engines": {
|
|
57
57
|
"node": ">=24"
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
.crossbind
|
|
2
|
+
.yarn
|
|
3
|
+
ios/build
|
|
4
|
+
android/build
|
|
5
|
+
|
|
6
|
+
# dependencies
|
|
7
|
+
node_modules/
|
|
8
|
+
|
|
9
|
+
# Expo
|
|
10
|
+
.expo/
|
|
11
|
+
dist/
|
|
12
|
+
web-build/
|
|
13
|
+
expo-env.d.ts
|
|
14
|
+
|
|
15
|
+
# Native
|
|
16
|
+
.kotlin/
|
|
17
|
+
*.orig.*
|
|
18
|
+
*.jks
|
|
19
|
+
*.p8
|
|
20
|
+
*.p12
|
|
21
|
+
*.key
|
|
22
|
+
*.mobileprovision
|
|
23
|
+
|
|
24
|
+
# Metro
|
|
25
|
+
.metro-health-check*
|
|
26
|
+
|
|
27
|
+
# debug
|
|
28
|
+
npm-debug.*
|
|
29
|
+
yarn-debug.*
|
|
30
|
+
yarn-error.*
|
|
31
|
+
|
|
32
|
+
# macOS
|
|
33
|
+
.DS_Store
|
|
34
|
+
*.pem
|
|
35
|
+
|
|
36
|
+
# local env files
|
|
37
|
+
.env*.local
|
|
38
|
+
|
|
39
|
+
# typescript
|
|
40
|
+
*.tsbuildinfo
|
|
41
|
+
|
|
42
|
+
app-example
|
|
43
|
+
|
|
44
|
+
# generated native folders
|
|
45
|
+
/ios
|
|
46
|
+
/android
|