Skip to content

Commit c16d665

Browse files
committed
feat: Migrate to Spago v1
Resolves #315
1 parent a1ecbca commit c16d665

12 files changed

Lines changed: 1843 additions & 161 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ stack build
7171

7272
# Set up the PureScript environment for the server
7373
cd staging
74-
spago build
74+
npm run build
7575

7676
# Ensure the compiled JavaScript is available to the client via symbolic link.
7777
ln -s "$PWD/output" "$PWD/../client/public/js/output"
@@ -111,8 +111,8 @@ npm run serve:(dev|production)
111111

112112
The built-in examples for Try PureScript are loaded from this GitHub repository. To change the tag that the examples are loaded from, you'll need to touch three files:
113113

114-
* `client/config/dev/Try.Config.purs`
115-
* `client/config/prod/Try.Config.purs`
114+
* `client/config/dev/src/Try/Config.purs`
115+
* `client/config/prod/src/Try/Config.purs`
116116
* `client/examples/Main.purs`, in the `fromExample` function.
117117

118118
If you are preparing a release or if you need to adjust examples in development, you should change the tag in these three places (and ensure you're using the same tag in each place!).

client/config/dev/Try.Config.purs

Lines changed: 0 additions & 15 deletions
This file was deleted.

client/config/prod/Try.Config.purs

Lines changed: 0 additions & 15 deletions
This file was deleted.

client/package.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,24 @@
33
"private": true,
44
"scripts": {
55
"clean": "rimraf output",
6-
"test": "spago test --path config/dev/Try.Config.purs",
7-
"build": "spago build --path config/dev/Try.Config.purs",
8-
"build:dev": "spago bundle-app --path config/dev/Try.Config.purs --to client.js",
9-
"build:production": "spago bundle-app --path config/prod/Try.Config.purs --purs-args '--censor-lib --strict' --to client.js",
10-
"bundle": "esbuild --outfile=public/js/index.js --bundle --minify --platform=browser --format=iife --tree-shaking=true client.js",
6+
"test": "spago test",
7+
"build": "spago build",
8+
"build:dev": "spago bundle --outfile client.js --force",
9+
"build:production": "spago bundle --outfile client.js --force --strict",
10+
"bundle:dev": "esbuild --define:__DEVELOPMENT__=true --outfile=public/js/index.js --bundle --minify --platform=browser --format=iife --tree-shaking=true client.js",
11+
"bundle:production": "esbuild --define:__DEVELOPMENT__=false --outfile=public/js/index.js --bundle --minify --platform=browser --format=iife --tree-shaking=true client.js",
1112
"serve": "http-server public/ -o / --cors=\"Access-Control-Allow-Origin: *\" -c-1",
12-
"serve:dev": "npm run build:dev && npm run bundle && npm run serve",
13-
"serve:production": "npm run build:production && npm run bundle && npm run serve",
13+
"serve:dev": "npm run build:dev && npm run bundle:dev && npm run serve",
14+
"serve:production": "npm run build:production && npm run bundle:production && npm run serve",
1415
"updateConfigVersions": "node updateSharedConfigVersions.mjs src/Try/SharedConfig.purs"
1516
},
1617
"devDependencies": {
1718
"esbuild": "^0.14.43",
1819
"http-server": "^14.1.0",
19-
"purescript": "^0.15.2",
20+
"purescript": "^0.15.10",
2021
"purescript-psa": "^0.8.2",
2122
"rimraf": "^2.5.4",
22-
"spago": "^0.20.9"
23+
"spago": "^1.0.4"
2324
},
2425
"dependencies": {
2526
"ace-builds": "^1.5.0",

client/packages.dhall

Lines changed: 0 additions & 5 deletions
This file was deleted.

client/spago.dhall

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)