Skip to content

Commit

Permalink
Fix build script
Browse files Browse the repository at this point in the history
  • Loading branch information
Specy committed Nov 5, 2024
1 parent 181214b commit de5ff3b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion bindings/typescript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ It is focused on providing educational resources for learning about parsing algo
Before using the `dotlr` library, you need to install it. The following instructions assume you have a project with `npm` already set up.

```bash
npm install dotlr
npm install dotlr
```

### Importing the Library
Expand Down
7 changes: 4 additions & 3 deletions bindings/typescript/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import fs from "fs/promises"

async function init() {
console.log("Starting build...")
await fs.unlink("./src/pkg/dotlr_bg.wasm.d.ts").catch(() => console.warn("No dotlr_bg.wasm.d.ts found"));
execSync('tsc', {stdio: 'inherit'});
await fs.cp("./src/pkg", "./dist/pkg", {recursive: true});
await fs.unlink("./dist/pkg/package.json");
await fs.unlink("./dist/pkg/README.md");
await fs.unlink("./dist/pkg/.gitignore");
await fs.unlink("./dist/pkg/package.json").catch(() => console.warn("No package.json found"));
await fs.unlink("./dist/pkg/README.md").catch(() => console.warn("No README.md found"));
await fs.unlink("./dist/pkg/.gitignore").catch(() => console.warn("No .gitignore found"));
console.log("Build complete")

}
Expand Down
8 changes: 4 additions & 4 deletions bindings/typescript/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit de5ff3b

Please sign in to comment.