Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"printWidth": 90,
"singleQuote": true,
"bracketSpacing": false,
"trailingComma": "all",
"jsxBracketSameLine": true
}
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ libs:
#$(MAKE) -C jscomp/runtime -j8 all
#$(MAKE) -C jscomp/others -j8 all
#$(MAKE) -C jscomp/stdlib -j8 all


DEST=lib/ocaml
RUNTIME=jscomp/runtime
Expand All @@ -40,7 +39,5 @@ install:
# $(RUNTIME)/js_typed_array.ml $(RUNTIME)/js_typed_array.cmi \
# $(STDLIB)/*.cm* $(STDLIB)/*.ml $(STDLIB)/*.mli \
# $(OTHERS)/*.ml $(OTHERS)/*.mli $(OTHERS)/*.cm* $(DEST)
cp -r $(OCAML)/lib/ocaml/caml $(DEST)


.PHONY: libs world
Binary file removed bin/ninja.exe
Binary file not shown.
44 changes: 44 additions & 0 deletions esy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"name": "bs-platform",
"description": "Bucklescript build system",
"version": "2.1.1",
"license": "SEE LICENSE IN LICENSE",
"author": "Hongbo Zhang <bobzhang1988@gmail.com>",
"esy": {
"build": [
["make", "world"],
["make", "install"],
["cp", "-rf", "#{self.target_dir / 'lib' }", "#{self.install}"],
["cp", "-rf", "#{self.target_dir / 'vendor' }", "#{self.install}"],
["cp", "-rf", "#{ocaml.lib / 'ocaml' / 'caml' }", "#{self.lib}"]
],
"install": [],
"buildsInSource": true,
"exportedEnv": {
"bs_custom_resolution": {
"val": "true",
"scope": "global"
},
"bs_platform__install": {
"val": "#{self.install}",
"scope": "global"
},
"PATH": {
"val": "#{self.lib : $PATH}",
"scope": "global"
}
}
},
"dependencies": {
"@esy-cross/ninja-build": "^1.8.2",
"@esy-ocaml/esy-installer": "^0.0.0",
"@esy-ocaml/substs": "^0.0.1",
"ocaml": "~4.6.1"
},
"peerDependencies": {
"ocaml": "~4.6.1"
},
"devDependencies": {
"@esy-ocaml/merlin": "*"
}
}
6 changes: 3 additions & 3 deletions jscomp/bsb/bsb_clean.ml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
let (//) = Ext_path.combine


let ninja_clean ~nested bsc_dir proj_dir =
try
let cmd = bsc_dir // "ninja.exe" in
let ninja_clean ~nested bsc_dir proj_dir =
try
let cmd = "ninja.exe" in
let cwd = proj_dir // nested // Bsb_config.lib_bs in
if Sys.file_exists cwd then
let eid =
Expand Down
4 changes: 2 additions & 2 deletions jscomp/bsb/bsb_main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@ let watch_exit () =
let () =
try begin
let ocaml_dir = Bsb_build_util.get_ocaml_dir cwd in
let vendor_ninja = bsc_dir // "ninja.exe" in
match Sys.argv with
let vendor_ninja = "ninja.exe" in
match Sys.argv with
(* Both of those are equivalent and the watcher will always pass in the `-backend` flag. *)
| [| _; "-backend"; _ |]
| [| _ |] -> (* specialize this path [bsb.exe] which is used in watcher *)
Expand Down
2 changes: 1 addition & 1 deletion jscomp/bsb/bsb_world.ml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ let install_targets ~backend cwd (config : Bsb_config_types.t option) =
let build_bs_deps cwd ~root_project_dir ~backend ~main_bs_super_errors deps =
let bsc_dir = Bsb_build_util.get_bsc_dir cwd in
let ocaml_dir = Bsb_build_util.get_ocaml_dir cwd in
let vendor_ninja = bsc_dir // "ninja.exe" in
let vendor_ninja = "ninja.exe" in
let all_external_deps = ref [] in
let all_ocamlfind_dependencies = ref [] in
let all_ocaml_dependencies = ref Depend.StringSet.empty in
Expand Down
12 changes: 6 additions & 6 deletions lib/bsb.ml
Original file line number Diff line number Diff line change
Expand Up @@ -6535,9 +6535,9 @@ end = struct
let (//) = Ext_path.combine


let ninja_clean ~nested bsc_dir proj_dir =
try
let cmd = bsc_dir // "ninja.exe" in
let ninja_clean ~nested bsc_dir proj_dir =
try
let cmd = "ninja.exe" in
let cwd = proj_dir // nested // Bsb_config.lib_bs in
if Sys.file_exists cwd then
let eid =
Expand Down Expand Up @@ -19365,7 +19365,7 @@ let install_targets ~backend cwd (config : Bsb_config_types.t option) =
let build_bs_deps cwd ~root_project_dir ~backend ~main_bs_super_errors deps =
let bsc_dir = Bsb_build_util.get_bsc_dir cwd in
let ocaml_dir = Bsb_build_util.get_ocaml_dir cwd in
let vendor_ninja = bsc_dir // "ninja.exe" in
let vendor_ninja = "ninja.exe" in
let all_external_deps = ref [] in
let all_ocamlfind_dependencies = ref [] in
let all_ocaml_dependencies = ref Depend.StringSet.empty in
Expand Down Expand Up @@ -20437,8 +20437,8 @@ let watch_exit () =
let () =
try begin
let ocaml_dir = Bsb_build_util.get_ocaml_dir cwd in
let vendor_ninja = bsc_dir // "ninja.exe" in
match Sys.argv with
let vendor_ninja = "ninja.exe" in
match Sys.argv with
(* Both of those are equivalent and the watcher will always pass in the `-backend` flag. *)
| [| _; "-backend"; _ |]
| [| _ |] -> (* specialize this path [bsb.exe] which is used in watcher *)
Expand Down
14 changes: 0 additions & 14 deletions opam.in

This file was deleted.

50 changes: 11 additions & 39 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,24 @@
"test": "go build -o test.exe scripts/test.go && ./test.exe",
"test-theme": "go run scripts/test.go -no-install-global -no-ounit -no-mocha -no-bsb",
"test-bsb": "go run scripts/test.go -no-install-global -no-ounit -no-mocha -no-theme",
"test-ocaml": "go run scripts/test.go -no-install-global -no-mocha -no-theme -no-bsb",
"cover": "istanbul cover --report html ./node_modules/.bin/_mocha -- ./jscomp/test/**/*test.js && open coverage/index.html",
"coverage": "istanbul cover ./node_modules/.bin/_mocha --report lcovonly -- './jscomp/test/*test.js'",
"coveralls": "npm run-script coverage && node ./node_modules/.bin/coveralls < coverage/lcov.info"
"test-ocaml":
"go run scripts/test.go -no-install-global -no-mocha -no-theme -no-bsb",
"cover":
"istanbul cover --report html ./node_modules/.bin/_mocha -- ./jscomp/test/**/*test.js && open coverage/index.html",
"coverage":
"istanbul cover ./node_modules/.bin/_mocha --report lcovonly -- './jscomp/test/*test.js'",
"coveralls":
"npm run-script coverage && node ./node_modules/.bin/coveralls < coverage/lcov.info"
},
"name": "bs-platform",
"version": "2.1.1",
"description": "bucklescript compiler, ocaml standard libary by bucklescript and its required runtime support",
"description":
"bucklescript compiler, ocaml standard libary by bucklescript and its required runtime support",
"repository": {
"type": "git",
"url": "git+https://github.com/bucklescript/bucklescript.git"
},
"keywords": [
"ocaml",
"bucklescript",
"stdlib",
"functional programming"
],
"keywords": ["ocaml", "bucklescript", "stdlib", "functional programming"],
"author": {
"name": "Hongbo Zhang"
},
Expand All @@ -57,28 +57,6 @@
"url": "https://github.com/bucklescript/bucklescript/issues"
},
"homepage": "https://github.com/bucklescript/bucklescript#readme",
"esy": {
"build": [
[ "node", "scripts/install.js" ],
[ "cp", "-r", "-f", "#{self.target_dir / 'lib' }", "#{self.install}" ],
[ "cp", "-r", "-f", "#{self.target_dir / 'vendor' }", "#{self.install}" ]
],
"buildsInSource": true,
"exportedEnv": {
"bs_custom_resolution": {
"val": "true",
"scope": "global"
},
"bs_platform__install": {
"val": "#{self.install}",
"scope": "global"
},
"PATH": {
"val": "#{bs-platform.lib : $PATH}",
"scope": "global"
}
}
},
"opam": {
"type": "binary",
"installPath": "bin",
Expand All @@ -99,11 +77,5 @@
"binaries": {
"./bin/bsb.exe": "bsb"
}
},
"dependencies": {
"ocaml": "~4.6.1"
},
"peerDependencies": {
"ocaml": "~4.6.1"
}
}
Loading