Skip to content

Commit a476a6b

Browse files
Build tooling, packaging updates, and documentation site (#42)
- Update tooling and build to generate ESM and CJS bundle (consistent with microbit-fs). - Use "ESNext" as module and "type: module". - Use TypeDoc to generate documentation site, simplify docs, and add GH workflow for it. Co-authored-by: Matt Hillsdon <[email protected]>
1 parent 18cce82 commit a476a6b

Some content is hidden

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

55 files changed

+2311
-10652
lines changed

.github/workflows/build-docs.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: build-docs
2+
on:
3+
release:
4+
types: [created]
5+
push:
6+
branches:
7+
- '**'
8+
tags:
9+
- '**'
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
- name: Setup Pages
17+
uses: actions/configure-pages@v5
18+
- run: npm ci
19+
- name: Build docs
20+
run: npm run docs
21+
- name: Upload artifact
22+
uses: actions/upload-pages-artifact@v3
23+
with:
24+
path: ./docs/build
25+
26+
deploy:
27+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
28+
permissions:
29+
pages: write
30+
id-token: write
31+
environment:
32+
name: github-pages
33+
url: ${{ steps.deployment.outputs.page_url }}
34+
runs-on: ubuntu-latest
35+
needs: build
36+
steps:
37+
- name: Deploy to GitHub Pages
38+
id: deployment
39+
uses: actions/deploy-pages@v4

.github/workflows/build.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ jobs:
1818
registry-url: 'https://registry.npmjs.org'
1919
cache: npm
2020
- run: npm ci
21-
- run: npm run test:coverage
22-
- run: npm run build
21+
- run: npm run ci
2322
- run: npm publish
2423
if: github.event_name == 'release' && github.event.action == 'created'
2524
env:

.npmignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ tslint.json
1010
**/prettier.config.js
1111

1212
# build scripts
13-
config/
1413
scripts/
1514

1615
# Test files
@@ -30,3 +29,5 @@ examples
3029
## this is generated by `npm pack`
3130
*.tgz
3231
package
32+
33+
**/__tests__/**

.vscode/launch.json

Lines changed: 0 additions & 22 deletions
This file was deleted.

config/global.d.ts

Lines changed: 0 additions & 38 deletions
This file was deleted.

config/jest.config.js

Lines changed: 0 additions & 26 deletions
This file was deleted.

config/rollup.config.js

Lines changed: 0 additions & 102 deletions
This file was deleted.

config/tsconfig.json

Lines changed: 0 additions & 16 deletions
This file was deleted.

config/typedoc.json

Lines changed: 0 additions & 48 deletions
This file was deleted.

config/types.d.ts

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)