-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.projenrc.js
46 lines (42 loc) · 1.26 KB
/
.projenrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
const { javascript } = require("projen");
const project = new javascript.NodeProject({
name: "@functionless/ast-reflection",
entrypoint: "ast_reflection.wasm",
defaultReleaseBranch: "main",
jest: false,
release: true,
releaseToNpm: true,
gitignore: ["/dist/", "/target/", "/ast_reflection.wasm"],
peerDeps: ["@swc/core"],
workflowBootstrapSteps: [
{
name: "Install rust",
uses: "actions-rs/toolchain@v1",
with: {
toolchain: "stable",
components: "rustfmt",
profile: "minimal",
override: true,
},
},
{
name: "Install wasm32-wasi",
run: "rustup target add wasm32-wasi",
},
],
});
project.addPackageIgnore("/.gitattributes");
project.addPackageIgnore("/target/");
project.addPackageIgnore("/tests/");
project.addPackageIgnore("/src/");
project.addPackageIgnore("/.github/");
project.addPackageIgnore("/Cargo.lock");
project.addPackageIgnore("/Cargo.toml");
project.addPackageIgnore("/rust-toolchain");
project.addPackageIgnore("/rustfmt.toml");
project.addPackageIgnore("/dist/");
project.compileTask.exec(
"cargo build --release --target wasm32-wasi && cp target/wasm32-wasi/release/ast_reflection.wasm ."
);
project.testTask.exec("sh ./tests/functionless.sh");
project.synth();