diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index f33f26a8..c246b03e 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -72,6 +72,12 @@ jobs:
npm run build
npm run test
npm run build:production
+ if [ "/output/ignored/" != "$(cat public/frame.html | grep '/\1/;')" ]; then
+ echo "client/public/frame.html's 'base' element refers to the wrong path"
+ echo "Run 'npm run base:production' in the 'client' dir, and push the update as a commit"
+ echo "CI will fail until then"
+ exit 1
+ fi
- name: Build client assets
if: github.event_name == 'release'
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 36d46714..107b1972 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,16 @@ Notable changes to this project are documented in this file. The format is based
## [Unreleased]
+Breaking changes:
+
+New features:
+
+Bugfixes:
+
+Other improvements:
+
+## [v2022-02-25.1](https://github.com/purescript/trypurescript/releases/tag/v2022-02-25.1)
+
Breaking changes:
- Update compiler to v0.14.7 (#271 by @JordanMartinez)
diff --git a/README.md b/README.md
index 0ffda87b..6dfe478c 100644
--- a/README.md
+++ b/README.md
@@ -96,15 +96,15 @@ ln -s "$PWD/output" "$PWD/../client/public/js/output"
cd client
npm install
-# Use `build:dev` if you are using a local Try PureScript server, e.g. you
-# followed the instructions in step 1.
+# Use `build:dev` and `base:dev` if you are using a local Try PureScript server,
+# e.g. you followed the instructions in step 1.
#
-# Use `build:production` if you would like to test the client against the production
-# Try PureScript server.
+# Use `build:production` and `base:production` if you would like
+# to test the client against the production Try PureScript server.
npm run build:(dev|production)
+npm run base:(dev|production)
-cd public
-npx http-server # Try PureScript is now available on localhost:8080
+npm run serve # Try PureScript is now available on localhost:8080
```
### 4. Choosing a Tag
diff --git a/RELEASE.md b/RELEASE.md
index 8f264c9e..55430624 100644
--- a/RELEASE.md
+++ b/RELEASE.md
@@ -39,3 +39,21 @@ Update the package set by doing the following:
```
$ spago ls packages | cut -f 1 -d ' ' | xargs spago install
```
+
+4. If any packages need NPM dependencies, you can try adding their shims to the import map in `client/public/frame.html`
+ - Open up the `generator.jspm.io` URL in the comment
+ - Use the 'Add Dependency' search bar to find the NPM dependency
+ - If it exists but doesn't exist in that CDN, you can try another one or [open an issue on `jspm/project`](https://github.com/jspm/project#issue-queue-for-the-jspm-cdn)
+ - Update the version to the one you need once added
+ - If needed, include other files from that dependency
+ - Copy and paste the content into the `client/public/frame.html` file
+ - Ensure `es-module-shims` has version `1.5.5` or greater.
+
+5. If `es-module-shims` releases a new version, you can calculate its SHA-384 via
+
+ ```console
+ $ ESM_VERSION=1.5.5
+ $ curl -L -o es-module-shims.js "https://ga.jspm.io/npm:es-module-shims@$ESM_VERSION/dist/es-module-shims.js"
+ $ echo "sha384-$(openssl dgst -sha384 -binary es-module-shims.js | openssl base64 -A)"
+ $ rm es-module-shims.js
+ ```
diff --git a/client/config/dev/Try.Config.purs b/client/config/dev/Try.Config.purs
index e81be3b2..598d3358 100644
--- a/client/config/dev/Try.Config.purs
+++ b/client/config/dev/Try.Config.purs
@@ -2,9 +2,6 @@ module Try.Config where
import Prelude
-loaderUrl :: String
-loaderUrl = "js/output"
-
compileUrl :: String
compileUrl = "http://localhost:8081"
diff --git a/client/config/prod/Try.Config.purs b/client/config/prod/Try.Config.purs
index 936b4b10..9a353f08 100644
--- a/client/config/prod/Try.Config.purs
+++ b/client/config/prod/Try.Config.purs
@@ -2,9 +2,6 @@ module Try.Config where
import Prelude
-loaderUrl :: String
-loaderUrl = "https://compile.purescript.org/output"
-
compileUrl :: String
compileUrl = "https://compile.purescript.org"
diff --git a/client/package.json b/client/package.json
index fc071535..7a325df7 100644
--- a/client/package.json
+++ b/client/package.json
@@ -3,12 +3,18 @@
"private": true,
"scripts": {
"clean": "rimraf output",
+ "base:dev": "node setBase.mjs \"dev\"",
+ "base:production": "node setBase.mjs \"prod\"",
"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:production": "spago bundle-app --path config/prod/Try.Config.purs --purs-args '--censor-lib --strict' --to public/js/index.js",
+ "serve": "http-server public/ -o / --cors=\"Access-Control-Allow-Origin: *\" -c-1",
+ "serve:dev": "npm run build:dev && npm run base:dev && npm run serve",
+ "serve:production": "npm run build:production && npm run base:production && npm run serve"
},
"devDependencies": {
+ "http-server": "^14.1.0",
"purescript": "^0.13.6",
"purescript-psa": "^0.7.3",
"rimraf": "^2.5.4",
diff --git a/client/public/frame.html b/client/public/frame.html
index ba347939..6b91dc85 100644
--- a/client/public/frame.html
+++ b/client/public/frame.html
@@ -5,9 +5,49 @@
-
+
+
+
+
+
+
+
+
+
+
-
+