Skip to content

Commit 066d11d

Browse files
committed
Merge pull request #130 from GordonSmith/ESM
feat: Switch default to ESM Modules
2 parents 601fa4f + 02a4e0f commit 066d11d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+3646
-2227
lines changed
File renamed without changes.

.github/workflows/deploy-docs.yml

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,46 @@
1-
# Simple workflow for deploying static content to GitHub Pages
2-
name: Deploy static content to Pages
1+
name: Deploy vitepress content to Pages
32

43
on:
5-
# Runs on pushes targeting the default branch
64
push:
7-
branches: ["trunk"]
5+
branches:
6+
- trunk
87

98
# Allows you to run this workflow manually from the Actions tab
109
workflow_dispatch:
1110

1211
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13-
permissions:
14-
contents: read
15-
pages: write
16-
id-token: write
17-
18-
# Allow one concurrent deployment
19-
concurrency:
20-
group: "pages"
21-
cancel-in-progress: true
12+
# permissions:
13+
# contents: read
14+
# pages: write
15+
# id-token: write
16+
17+
# # Allow one concurrent deployment
18+
# concurrency:
19+
# group: "pages"
20+
# cancel-in-progress: true
2221

2322
jobs:
24-
# Single deploy job since we're just deploying
23+
# Build job
2524
deploy:
26-
environment:
27-
name: github-pages
28-
url: ${{ steps.deployment.outputs.page_url }}
2925
runs-on: ubuntu-latest
3026
steps:
3127
- name: Checkout
3228
uses: actions/checkout@v3
33-
- name: Setup Pages
34-
uses: actions/configure-pages@v2
35-
- name: Upload artifact
36-
uses: actions/upload-pages-artifact@v1
29+
30+
- name: Setup Node
31+
uses: actions/setup-node@v3
3732
with:
38-
# Upload entire repository
39-
path: '.'
33+
node-version: 16
34+
35+
- run: npm ci
36+
- run: npm run build-docs
37+
4038
- name: Deploy to GitHub Pages
41-
id: deployment
42-
uses: actions/deploy-pages@v1
39+
uses: peaceiris/actions-gh-pages@v3
40+
with:
41+
github_token: ${{ secrets.GITHUB_TOKEN }}
42+
publish_dir: ./docs/.vitepress/dist
43+
force_orphan: true
44+
# cname: example.com # if wanna deploy to custom domain
45+
env:
46+
CI: true

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
/coverage
88
/dist
99
/dist-test
10+
/docs/.vitepress/dist
11+
/docs/classes
12+
/docs/interfaces
13+
/docs/modules
14+
/docs/.nojekyll
15+
/docs/README.md
1016
/emsdk*
1117
/lib-*
1218
/node_modules

.vscode/launch.json

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,6 @@
5757
],
5858
"type": "node"
5959
},
60-
{
61-
"name": "sfx-wasm",
62-
"program": "${workspaceFolder}/bin/sfx-wasm.mjs",
63-
"request": "launch",
64-
"args": [
65-
"./build/cpp/base91/base91lib.wasm"
66-
],
67-
"skipFiles": [
68-
"<node_internals>/**"
69-
],
70-
"type": "node"
71-
},
7260
{
7361
"name": "cli rollup wasm",
7462
"program": "${workspaceFolder}/output-node/test-wasm.js",

.vscode/tasks.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
{
2727
"type": "npm",
2828
"label": "Web Server",
29-
"script": "dev-start",
29+
"script": "serve",
3030
"problemMatcher": [],
3131
"presentation": {
3232
"group": "group-build"

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ SET(EM_FLAGS
2020
"-s USE_ES6_IMPORT_META=0"
2121
# "-s WASM_BIGINT=1"
2222
"-s STANDALONE_WASM=0"
23+
"-s BINARYEN_ASYNC_COMPILATION=1"
2324
# "-s DYNAMIC_EXECUTION=0"
2425
"--pre-js ${CMAKE_CURRENT_SOURCE_DIR}/cpp/src/pre.js"
2526
"--post-js ${CMAKE_CURRENT_SOURCE_DIR}/cpp/src/post.js"

0 commit comments

Comments
 (0)