Skip to content

Commit

Permalink
add files and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nichoth committed Jun 5, 2024
1 parent d57c2c2 commit 6d3bbe7
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 1 deletion.
52 changes: 52 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
name: GitHub Pages deploy

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

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

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Install
run: npm install
- name: Build
run: npm run build-docs
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/node_modules
/dist
docs
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "15.4.14",
"description": "A component framework.",
"main": "dist/tonic.js",
"files": ["dist/*"],
"type": "module",
"scripts": {
"lint": "eslint ./src/index.js ./test/index.js",
Expand All @@ -11,6 +12,7 @@
"test:open": "npm run build && esbuild --bundle test/index.js | tape-run --browser chrome --keep-open",
"build:main": "esbuild src/index.js --define:VERSION=\\\"$npm_package_version\\\" --outfile=dist/tonic.js",
"build:minify": "esbuild src/index.js --keep-names --minify --outfile=dist/tonic.min.js",
"build-docs": "typedoc ./src/index.d.ts",
"build": "mkdir -p ./dist && rm -rf ./dist/* && npm run build:main && npm run build:minify && cp ./src/index.d.ts ./dist/tonic.d.ts",
"preversion": "npm run lint",
"version": "auto-changelog -p --template keepachangelog auto-changelog --breaking-pattern 'BREAKING CHANGE:' && git add CHANGELOG.md",
Expand All @@ -27,6 +29,7 @@
"tap-arc": "1.2.2",
"tap-spec": "5.0.0",
"tape-run": "^11.0.0",
"typedoc": "0.25.13",
"uuid": "^9.0.0"
},
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

interface ITonicComponent extends Tonic {}

type TonicComponent = (()=>TonicTemplate|HTMLElement)|typeof Tonic<T>
type TonicComponent = (()=>TonicTemplate|HTMLElement)|typeof Tonic

/**
* Class Tonic
Expand Down

0 comments on commit 6d3bbe7

Please sign in to comment.