diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f33f26a8..9b2fed49 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,6 +72,7 @@ jobs: npm run build npm run test npm run build:production + npm run bundle - name: Build client assets if: github.event_name == 'release' diff --git a/.gitignore b/.gitignore index eb1860a6..a7fcc9b6 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ cabal.sandbox.config *.lksh* bundle/ client/public/js/output +client/client.js diff --git a/CHANGELOG.md b/CHANGELOG.md index ff1ae5d5..e9e5b019 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ New features: Bugfixes: Other improvements: +- Update client to 0.15.2; bundle via esbuild (#278 by @JordanMartinez) ## [v2022-06-10.1](https://github.com/purescript/trypurescript/releases/tag/v2022-06-10.1) diff --git a/client/package.json b/client/package.json index c9cf67ad..ac057b9b 100644 --- a/client/package.json +++ b/client/package.json @@ -5,17 +5,23 @@ "clean": "rimraf output", "test": "spago test --path config/dev/Try.Config.purs", "build": "spago build --path config/dev/Try.Config.purs", - "build:dev": "spago bundle-app --path config/dev/Try.Config.purs --to public/js/index.js", - "build:production": "spago bundle-app --path config/prod/Try.Config.purs --purs-args '--censor-lib --strict' --to public/js/index.js", + "build:dev": "spago bundle-app --path config/dev/Try.Config.purs --to client.js", + "build:production": "spago bundle-app --path config/prod/Try.Config.purs --purs-args '--censor-lib --strict' --to client.js", + "bundle": "esbuild --outfile=public/js/index.js --bundle --minify --platform=browser --format=iife --tree-shaking=true --footer:js=\"\n\nmain();\" client.js", "serve": "http-server public/ -o / --cors=\"Access-Control-Allow-Origin: *\" -c-1", - "serve:dev": "npm run build:dev && npm run serve", - "serve:production": "npm run build:production && npm run serve" + "serve:dev": "npm run build:dev && npm run bundle && npm run serve", + "serve:production": "npm run build:production && npm run bundle && npm run serve" }, "devDependencies": { + "esbuild": "^0.14.43", "http-server": "^14.1.0", - "purescript": "^0.13.6", - "purescript-psa": "^0.7.3", + "purescript": "^0.15.2", + "purescript-psa": "^0.8.2", "rimraf": "^2.5.4", - "spago": "^0.14.0" + "spago": "^0.20.9" + }, + "dependencies": { + "ace-builds": "^1.5.0", + "jquery": "^1.12.4" } } diff --git a/client/packages.dhall b/client/packages.dhall index 75331a36..c1888031 100644 --- a/client/packages.dhall +++ b/client/packages.dhall @@ -1,22 +1,5 @@ let upstream = - https://github.com/purescript/package-sets/releases/download/psc-0.13.6-20200404/packages.dhall sha256:f239f2e215d0cbd5c203307701748581938f74c4c78f4aeffa32c11c131ef7b6 + https://github.com/purescript/package-sets/releases/download/psc-0.15.2-20220609/packages.dhall + sha256:2b15922dcc47143e5f271a75d4aa91b0379bc1bd7d880adfb428e287617210f7 -let additions = - { ace = - { repo = "https://github.com/purescript-contrib/purescript-ace.git" - , version = "v7.0.0" - , dependencies = - [ "arrays" - , "console" - , "effect" - , "foreign" - , "nullable" - , "prelude" - , "refs" - , "web-html" - , "web-uievents" - ] - } - } - -in upstream // additions +in upstream diff --git a/client/public/index.html b/client/public/index.html index 44a29b24..2cdc56ce 100644 --- a/client/public/index.html +++ b/client/public/index.html @@ -19,67 +19,6 @@
-