Skip to content

Commit da39e3a

Browse files
committed
changed template to files
1 parent 1fb0a22 commit da39e3a

File tree

5 files changed

+19
-33
lines changed

5 files changed

+19
-33
lines changed

apps/test-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"test:ios:ferricExample": "MOCHA_REMOTE_CONTEXT=ferricExample npm run test:ios -- ",
1818
"gen:rs": "ferric init lib_in_rust",
1919
"build:rs": "ferric build --cwd lib_in_rust",
20-
"build:rs:release": "npm run build:rs --configuration release"
20+
"build:rs:release": "npm run build:rs -- --configuration release"
2121
},
2222
"dependencies": {
2323
"@babel/core": "^7.26.10",
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
target
2+
Cargo.lock
3+
4+
*.xcframework/
5+
*.apple.node/
6+
*.android.node/
7+
8+
dist
Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
export function cargoTomlTemplate(projectName: string) {
2-
return `
31
[package]
4-
name = ${projectName}
2+
name = "PROJECT_NAME"
53
version = "1.0.0"
64
edition = "2021"
75
license = "MIT"
@@ -27,32 +25,3 @@ lto = true
2725
codegen-units = 1
2826
strip = "symbols"
2927
opt-level = "z"
30-
panic = "abort"
31-
`;
32-
}
33-
34-
export const GIT_IGNORE_TEMPLATE = `
35-
target
36-
Cargo.lock
37-
38-
*.xcframework/
39-
*.apple.node/
40-
*.android.node/
41-
42-
dist
43-
`;
44-
45-
export const BUILD_RS_TEMPLATE = `
46-
fn main() {
47-
napi_build::setup();
48-
}
49-
`;
50-
51-
export const LIB_RS_TEMPLATE = `
52-
use napi_derive::napi;
53-
54-
#[napi]
55-
pub fn sum(a: i32, b: i32) -> i32 {
56-
a + b
57-
}
58-
`;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn main() {
2+
napi_build::setup();
3+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
use napi_derive::napi;
2+
3+
#[napi]
4+
pub fn sum(a: i32, b: i32) -> i32 {
5+
a + b
6+
}

0 commit comments

Comments
 (0)