Skip to content

Commit

Permalink
Update ts2ocaml to 2.0.0-beta.2
Browse files Browse the repository at this point in the history
Signed-off-by: Sora Morimoto <[email protected]>
  • Loading branch information
smorimoto committed Mar 2, 2024
1 parent ef4cd2e commit 308f370
Show file tree
Hide file tree
Showing 7 changed files with 1,854 additions and 160 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ jobs:

- run: yarn exec -- opam exec -- make

- run: node dist/index.js
- run: node dist/main.bc.js
9 changes: 2 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pretty-bytes:
--output-dir=lib \
--preset=full \
--simplify \
--number-as-int \
--number-as-int \
--verbose \
--nowarn

Expand All @@ -17,12 +17,7 @@ bindings: pretty-bytes
.PHONY: build
build:
dune build @all --profile=release
esbuild _build/default/bin/main.bc.js \
--bundle \
--minify \
--outfile=dist/index.js \
--platform=node \
--analyze
tsup

.PHONY: fmt
fmt:
Expand Down
2 changes: 1 addition & 1 deletion example.opam
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ build: [
]
dev-repo: "git+https://github.com/ocsigen/ts2ocaml.git"
pin-depends: [
[ "ts2ocaml-jsoo-stdlib.dev" "git+https://github.com/ocsigen/ts2ocaml.git#jsoo-stdlib-v1.4.6" ]
[ "ts2ocaml-jsoo-stdlib.dev" "git+https://github.com/ocsigen/ts2ocaml.git#jsoo-stdlib-v2.0.0-beta.2" ]
]
2 changes: 1 addition & 1 deletion example.opam.template
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pin-depends: [
[ "ts2ocaml-jsoo-stdlib.dev" "git+https://github.com/ocsigen/ts2ocaml.git#jsoo-stdlib-v1.4.6" ]
[ "ts2ocaml-jsoo-stdlib.dev" "git+https://github.com/ocsigen/ts2ocaml.git#jsoo-stdlib-v2.0.0-beta.2" ]
]
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"pretty-bytes": "5.6.0"
},
"devDependencies": {
"@ocsigen/ts2ocaml": "1.4.6",
"esbuild": "0.20.1"
"@ocsigen/ts2ocaml": "2.0.0-beta.2",
"tsup": "8.0.2"
},
"packageManager": "[email protected]"
}
12 changes: 12 additions & 0 deletions tsup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { defineConfig } from "tsup";

export default defineConfig({
entry: ["_build/default/bin/main.bc.js"],
clean: true,
format: "cjs",
minify: true,
sourcemap: true,
splitting: true,
target: "node20",
treeshake: true,
});
Loading

0 comments on commit 308f370

Please sign in to comment.