Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion javascript-esm/.nvmrc

This file was deleted.

2 changes: 2 additions & 0 deletions javascript-esm/.tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node 22
yarn 3
27 changes: 21 additions & 6 deletions javascript-esm/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,30 @@
# Javascript ESM

Skeleton project for Javascript (ESM) with Jest for testing.
Skeleton project for Javascript (ESM).

## Usage
- `./script/setup` to install dependencies
- `./script/test` to run the tests
- `./script/start` to run the index.js file
## Prerequisites

The toolchain this project needs is declared in [`.tool-versions`](./.tool-versions):

```
node 22
yarn 3
```

Install those however you prefer, as long as they end up on your `PATH`. The quickest route is
[mise](https://mise.jdx.dev/), which reads the file for you:

```sh
mise install
```

## Usage
- `./script/setup` to fetch dependencies
- `./script/test` to run the tests, or `./script/test --watch` to re-run them on every change
- `./script/start` to run the app

## Structure
- Code located in [`index.js`](./src/index.js)
- Tests located in [`index.test.js`](./src/index.test.js)

However, you're free to organise your code as you like.
However, you're free to organise your code as you like.
4 changes: 3 additions & 1 deletion javascript-esm/script/setup
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

set -e
set -euo pipefail

cd "$(dirname "${BASH_SOURCE[0]}")/.."

yarn
4 changes: 3 additions & 1 deletion javascript-esm/script/start
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

set -e
set -euo pipefail

cd "$(dirname "${BASH_SOURCE[0]}")/.."

yarn start
Loading