README.md 933 Bytes
Newer Older
tracey's avatar
tracey committed
1
# ES Modules https://esm.sh self-hosted
tracey's avatar
tracey committed
2

tracey's avatar
tracey committed
3
4
you know, for privacy, peoples :)

tracey's avatar
tracey committed
5
6
7
8
9
10
11
12
13
14
15
## Usage
Use like this in your JS files:
```js
import $ from 'https://esm.archive.org/jquery'
import dayjs from 'https://esm.archive.org/dayjs'

// semvar works, too, like `npm` and `package.json`
import $ from 'https://esm.archive.org/jquery@^3.0.0'
```
@see https://esm.sh for more usage and examples

16
17
18
19
20
21
## TESTING
This repo has an *extensive* integration test that utilizes multiple containers (!) to fully build all petabox `.min.js` files.

@see [.gitlab-ci.yml](.gitlab-ci.yml)


tracey's avatar
tracey committed
22
## References
tracey's avatar
tracey committed
23
24
- @see https://github.com/ije/esm.sh/blob/main/HOSTING.md
- @see https://github.com/ije/esm.sh/blob/main/Dockerfile
25
26
27
28
29
30
31
32
33
34
35

## To run / test locally
you can do something like:
```bash

git clone https://github.com/ije/esm.sh
cd esm.sh
go build -o esmd main.go
echo '{"port":8888, "workDir":"./ee", "logLevel":"debug"}' > config.json
./esmd  --config=config.json
```