Add Parcel to dev dependencies

Closes: https://todo.sr.ht/~emersion/gamja/119
This commit is contained in:
Simon Ser 2021-11-04 12:21:21 +01:00
parent 50f10a43dd
commit 7b19cf48a4
3 changed files with 13989 additions and 11 deletions

View file

@ -12,6 +12,9 @@ First install dependencies:
npm install --production
Then configure an HTTP server to serve the gamja files. Below are some
server-specific instructions.
### [soju]
Add a WebSocket listener to soju, e.g. `listen wss://127.0.0.1:8080`.
@ -54,20 +57,24 @@ server doesn't send PINGs, you can set the `server.ping` option in
### Development server
Start your IRC WebSocket server, e.g. on port 8080. Then run:
Any HTTP server capable of serving static files can be used. For instance:
npm install
python -m http.server
If your IRC WebSocket server is started on port 8080, you can head over to
`http://localhost:8000/?server=ws://localhost:8080` to connect to the server.
Alternatively, the gamja development dependencies also include an HTTP server:
npm install --include=dev
npm start
This will start a development HTTP server for gamja. Connect to it and append
`?server=ws://localhost:8080` to the URL.
### Production build
Optionally, [Parcel] can be used to build a minified version of gamja. Install
Parcel and then run:
Optionally, [Parcel] can be used to build a minified version of gamja.
parcel build
npm install --include=dev
npm run build
## Query parameters

13969
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -6,10 +6,14 @@
"preact": "^10.5.9"
},
"devDependencies": {
"http-server": "^14.0.0"
"@parcel/packager-raw-url": "^2.0.0",
"@parcel/transformer-webmanifest": "^2.0.0",
"http-server": "^14.0.0",
"parcel": "^2.0.0"
},
"scripts": {
"start": "http-server ."
"start": "http-server .",
"build": "parcel build"
},
"private": true,
"targets": {