From 3f2157ea56afd29d04a0a77fa79dbbdf9cf707a2 Mon Sep 17 00:00:00 2001 From: Leandro Ostera Date: Tue, 15 Jan 2019 09:57:15 -0300 Subject: [PATCH] [meta] Build with esy --- .gitignore | 9 +++++ REASON_REWRITE.md | 10 ++++++ package.json | 87 +++++++++++++++++++++++------------------------ 3 files changed, 61 insertions(+), 45 deletions(-) diff --git a/.gitignore b/.gitignore index b3dce16..c57e4ed 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,12 @@ TODO _build .merlin *.install + +.DS_Store +.merlin +.bsb.lock +npm-debug.log +lib/bs + +_esy +esy.lock diff --git a/REASON_REWRITE.md b/REASON_REWRITE.md index a5b10d8..fa60fde 100644 --- a/REASON_REWRITE.md +++ b/REASON_REWRITE.md @@ -257,3 +257,13 @@ It is not suitable for use on the web. ### `tldr/web` + +## BuckleScript Notes + +1. Setting up `menhir` and `ocamllex` is quite inelegant, since the hooks + needed depend on my globally installed tools. I can live with it but + unfortunately by default it will generate those files in my source folder, + which conflicts with the `dune` build. + +2. Actually, running `bsb` and `dune` in harmony on the same hybrid seems to be + impossible. diff --git a/package.json b/package.json index 911ef7b..972197d 100644 --- a/package.json +++ b/package.json @@ -3,54 +3,51 @@ "description": "A reactive web client for tldr-pages", "author": "Leandro Ostera ", "repository": "https://github.com/ostera/tldr.jsx", - "bugs": { - "url": "https://github.com/ostera/tldr.jsx/issues" - }, + "bugs": { "url": "https://github.com/ostera/tldr.jsx/issues" }, "homepage": "https://tldr.ostera.io", "license": "MIT", - "version": "3.5.2", - "main": "src/app.js", + "version": "4.0.0", + "esy": { + "build": "refmterr dune build", + "NOTE": "Optional release Section. Customizes result of `esy release`", + "release": { "bin": [ "TldrApp.exe" ] } + }, + "scripts": { "test": "esy x TldrApp.exe" }, "dependencies": { - "babel-eslint": "^7.1.1", - "babel-plugin-transform-flow-strip-types": "^6.8.0", - "babel-plugin-transform-function-bind": "^6.8.0", - "babel-preset-es2015": "^6.9.0", - "babel-preset-react": "^6.5.0", - "babel-preset-stage-0": "^6.5.0", - "babel-preset-stage-1": "^6.5.0", - "babel-preset-stage-2": "^6.5.0", - "babel-preset-stage-3": "^6.5.0", - "babel-runtime": "^6.9.2", - "babelify": "^7.3.0", - "base-64": "^0.1.0", - "browserify": "^13.0.1", - "envify": "^4.0.0", - "eslint": "^3.1.0", - "eslint-plugin-react": "^6.7.1", - "exorcist": "^0.4.0", - "flow-bin": "^0.43.0", - "history": "^4.4.0", - "jest-cli": "^18.1.0", - "marked": "^0.3.5", - "mixpanel-browser": "^2.8.1", - "node-sass": "^4.0.0", - "query-string": "^4.2.2", - "react": "^15.1.0", - "react-dom": "^15.1.0", - "reactify": "^1.1.1", - "rxjs": "^5.0.0-beta.10", - "static-server": "^2.0.2", - "uglify-js": "^2.6.4" + "@esy-ocaml/reason": "*", + "@opam/base64": "2.3.0", + "@opam/cmdliner": "1.0.3", + "@opam/dune": "*", + "@opam/fmt": "0.8.5", + "@opam/fpath": "0.7.2", + "@opam/httpkit": "*", + "@opam/httpkit-lwt": "*", + "@opam/logs": "0.6.2", + "@opam/lwt": "4.1.0", + "@opam/menhir": "20181113", + "@opam/result": "1.3", + "@opam/rresult": "0.6.0", + "@opam/uri": "2.1.0", + "@opam/yojson": "1.5.0", + "@reason-native/console": "*", + "@reason-native/pastel": "*", + "@reason-native/rely": "*", + "ocaml": "~4.6.0", + "reason-glfw": "^3.2.1010", + "refmterr": "*", + "revery": "^0.3.1" }, - "scripts": {}, - "browserify": { - "transform": [ - "envify", - "babelify", - "reactify" - ] + "resolutions": { + "@opam/cmdliner": "1.0.2", + "@opam/js_of_ocaml": + "github:ocsigen/js_of_ocaml:js_of_ocaml.opam#db257ce", + "@opam/js_of_ocaml-compiler": + "github:ocsigen/js_of_ocaml:js_of_ocaml-compiler.opam#db257ce", + "@esy-ocaml/reason": "facebook/reason#ab49908", + "@opam/httpkit": "ostera/httpkit:httpkit.opam#c1c32c1", + "@opam/httpkit-lwt": "ostera/httpkit:httpkit-lwt.opam#c1c32c1", + "@opam/httpaf": "anmonteiro/httpaf:httpaf.opam#57e9dd2", + "@opam/httpaf-lwt": "anmonteiro/httpaf:httpaf-lwt.opam#57e9dd2" }, - "jest": { - "rootDir": "./src" - } + "devDependencies": { "@opam/merlin": "*", "ocaml": "~4.6.0" } }