-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
45 lines (45 loc) · 2.25 KB
/
package.json
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
{
"name": "melange-template",
"version": "1.0.0",
"scripts": {
"preinstall-opam": "opam update",
"install-opam": "opam install -y . --deps-only --with-test",
"check-pnpm-deps": "opam exec opam-check-npm-deps",
"init": "opam switch create . 5.2.0 -y --deps-only && pnpm run install-opam-pnpm",
"install-opam-pnpm": "pnpm install && pnpm run install-opam && pnpm run check-pnpm-deps",
"dune": "opam exec -- dune",
"build": "pnpm run dune build @react @node",
"build-verbose": "pnpm run build --verbose",
"clean": "pnpm run dune clean",
"format": "pnpm run format-check --auto-promote",
"format-check": "pnpm run dune build @fmt",
"watch": "pnpm run build --watch",
"bundle": "webpack --mode production --entry ./_build/default/src/output/src/ReactApp.js",
"serve": "webpack serve --open --mode development --entry ./_build/default/src/output/src/ReactApp.js"
},
"scriptsComments": {
"preinstall-opam": "# Sync opam database with upstream repositories: https://opam.ocaml.org/doc/Usage.html#opam-update",
"install-opam": "# Downloads, builds and installs opam pkgs: https://opam.ocaml.org/doc/Usage.html#opam-install",
"check-pnpm-deps": "# Checks that Melange bindings have their JS dependencies available: https://github.com/ahrefs/opam-check-npm-deps",
"init": "# Create opam switch: https://opam.ocaml.org/doc/Usage.html#opam-switch and prepare everything to work in development mode (run just once, for initialization)",
"install-opam-pnpm": "# Install both opam and pnpm deps",
"dune": "# Run dune, OCaml's build tool",
"build": "# Build the Melange apps",
"build-verbose": "# Build the Melange apps in verbose mode",
"clean": "# Cleans all Melange artifacts",
"format": "# Formats the Melange sources using ocamlformat",
"format-check": "# Checks that the Melange sources have the right formatting (read-only)",
"watch": "opam exec -- dune build --watch @react @node",
"bundle": "# Bundle the JavaScriptapps generated by Melange",
"serve": "# Serves the React app in a local server"
},
"dependencies": {
"react": "^18.3.0",
"react-dom": "^18.3.0"
},
"devDependencies": {
"webpack": "^5.94.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.1.0"
}
}