feat: add build script #13

Merged
glen merged 1 commits from build_script into main 2023-08-23 03:20:11 +00:00
6 changed files with 13 additions and 8 deletions

2
.gitignore vendored
View File

@ -2,7 +2,7 @@
*~
# Typescript
# emitted code
obj
build
# ---> Node
# Logs

1
.npmrc Normal file
View File

@ -0,0 +1 @@
shell-emulator=true

View File

@ -2,10 +2,9 @@
A final (?) prototype for a refactor of mathjs, culminating the picomath, pocomath, typomath series. Provides an extensible core with "fuzzy" types for its operations, that can at any time generate exact .d.ts file for its current state.
To build and run the prototype, run:
```
npx tsc
echo '{"type": "module"}' > obj/package.json
node obj
```
Convenience scripts:
* `pnpm build` -- compile the package
* `pnpm exec` -- run the compiled code produced by `pnpm build`
* `pnpm go` -- both of the above in sequence.

1
etc/package.json Normal file
View File

@ -0,0 +1 @@
{"type": "module"}

View File

@ -5,7 +5,11 @@
main: 'index.ts',
scripts: {
test: 'echo "Error: no test specified" && exit 1',
build: 'tsc && cp etc/package.json build',
exec: 'node build',
go: 'pnpm --sequential "/build|exec/"',
},
packageManager: 'pnpm',
keywords: [
'math',
'algebra',

View File

@ -2,7 +2,7 @@
"compilerOptions": {
"target": "ES2022",
"rootDir": "./src",
"outDir": "./obj",
"outDir": "./build",
"moduleResolution": "nodenext"
}
}