Skip to content

Commit

Permalink
feat: Switch default to ESM Modules
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Refactor public interfaces to follow common pattern
Start using sfx-wasm bundler

Update docs to use vitepress

Signed-off-by: Gordon Smith <[email protected]>
  • Loading branch information
GordonSmith committed Nov 7, 2022
1 parent 601fa4f commit 02a4e0f
Show file tree
Hide file tree
Showing 60 changed files with 3,633 additions and 2,219 deletions.
File renamed without changes.
41 changes: 24 additions & 17 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages
name: Deploy vitepress content to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["trunk"]
branches:
- trunk

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -14,29 +13,37 @@ permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
# Single deploy job since we're just deploying
# Build job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Upload artifact
uses: actions/upload-pages-artifact@v1

- name: Setup Node
uses: actions/setup-node@v3
with:
# Upload entire repository
path: '.'
node-version: 16

- name: Install Dependencies
run: npm ci

- name: Build Docs
run: npm run build

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/.vitepress/dist
force_orphan: true
# cname: example.com # if wanna deploy to custom domain
env:
CI: true
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
/coverage
/dist
/dist-test
/docs/.vitepress/dist
/docs/classes
/docs/interfaces
/docs/modules
/docs/.nojekyll
/docs/README.md
/emsdk*
/lib-*
/node_modules
Expand Down
12 changes: 0 additions & 12 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,6 @@
],
"type": "node"
},
{
"name": "sfx-wasm",
"program": "${workspaceFolder}/bin/sfx-wasm.mjs",
"request": "launch",
"args": [
"./build/cpp/base91/base91lib.wasm"
],
"skipFiles": [
"<node_internals>/**"
],
"type": "node"
},
{
"name": "cli rollup wasm",
"program": "${workspaceFolder}/output-node/test-wasm.js",
Expand Down
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
{
"type": "npm",
"label": "Web Server",
"script": "dev-start",
"script": "serve",
"problemMatcher": [],
"presentation": {
"group": "group-build"
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ SET(EM_FLAGS
"-s USE_ES6_IMPORT_META=0"
# "-s WASM_BIGINT=1"
"-s STANDALONE_WASM=0"
"-s BINARYEN_ASYNC_COMPILATION=1"
# "-s DYNAMIC_EXECUTION=0"
"--pre-js ${CMAKE_CURRENT_SOURCE_DIR}/cpp/src/pre.js"
"--post-js ${CMAKE_CURRENT_SOURCE_DIR}/cpp/src/post.js"
Expand Down
Loading

0 comments on commit 02a4e0f

Please sign in to comment.