Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: chartjs/chartjs-plugin-zoom
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0.0-beta.1
Choose a base ref
...
head repository: chartjs/chartjs-plugin-zoom
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Mar 8, 2021

  1. Copy the full SHA
    7c61ddc View commit details

Commits on Mar 9, 2021

  1. Fix non-zoomable charts eating scroll events (#429)

    * Fix non-zoomable charts eating scroll events
    jacopotediosi authored Mar 9, 2021
    Copy the full SHA
    df5b65e View commit details

Commits on Mar 11, 2021

  1. Added optional modifier keys (#382)

    * Added optional modifier keys
    
    * Renamed failure* events to rejected*
    BarryPSmith authored Mar 11, 2021
    Copy the full SHA
    e6658c9 View commit details
  2. Add tests, fix readme issues (#437)

    * Add tests, fix readme issues
    
    * Use promise
    
    * dpr=1
    
    * Remove deprecated options
    
    * Add zoom+reset fixture
    
    * Add simulated pan fixture
    
    * Update test lint config
    kurkle authored Mar 11, 2021
    Copy the full SHA
    adef834 View commit details
  3. adding typings for Zoom analog to chartjs-plugin-annotation (#438)

    Co-authored-by: Zeugner, Thomas <Thomas.Zeugner@kuka.com>
    tomsoftware and Zeugner, Thomas authored Mar 11, 2021
    Copy the full SHA
    f537880 View commit details

Commits on Mar 12, 2021

  1. Reuse types from Chart.ts (#439)

    * Reuse types from Chart.ts
    
    This may be a good idea because chartjs-plugin-zoom is strongly bundled with chartjs
    
    * fix type for RangePoint
    
    fix type for RangePoint
    tomsoftware authored Mar 12, 2021
    Copy the full SHA
    45e1f47 View commit details
  2. Copy the full SHA
    12c1b39 View commit details
  3. Feature: Zoom each scale separately

    Added the overScaleMode option so that you can use zoom and pan separately for each scale when the mouse is over the scale.
    lirik90 authored Mar 12, 2021
    Copy the full SHA
    2f72a1e View commit details

Commits on Apr 4, 2021

  1. Copy the full SHA
    7372e05 View commit details

Commits on Apr 15, 2021

  1. Remove animationDuration option (#451)

    * Remove animationDuration option
    
    * Use a useTransition parameter
    jledentu authored Apr 15, 2021
    Copy the full SHA
    c38805b View commit details
  2. Copy the full SHA
    b4c9462 View commit details

Commits on Apr 16, 2021

  1. Refactor to logical entities (#452)

    * Refactor to logical entities
    
    * Remove monolith
    
    * Complete refactoring
    
    * Add tolerance
    
    * Fix drag-zoom, complete let/const
    
    * Better helper names, shorten wheel
    
    * Remove duplicate drag rect calculations
    kurkle authored Apr 16, 2021
    Copy the full SHA
    c5c7d47 View commit details
  2. Copy the full SHA
    b49c8e9 View commit details

Commits on Apr 17, 2021

  1. Refactor startHammer (#455)

    * Refactor startHammer
    
    * Remove duplicate onZoom call
    
    * More refactoring
    
    * Reduce lines
    
    * Reduce more lines
    kurkle authored Apr 17, 2021
    Copy the full SHA
    b7bd3e2 View commit details
  2. Internal state handling (#457)

    * Internal state handling
    
    * More refactoring
    
    * Add tolerance
    
    * Remove unused functions
    kurkle authored Apr 17, 2021
    Copy the full SHA
    15c443d View commit details

Commits on Apr 25, 2021

  1. Add initial docs (#456)

    * Add initial docs
    
    * Remove autocolors
    
    * Bugfix
    
    * Capitalize Installation
    
    * Prevent tension in scatter
    
    * Add basic sample
    
    * Update default sample
    
    * Add options
    
    * Update deps
    
    * Remove unused sensitivity option
    
    * Implement most of samples in docs
    
    * Add linting for types
    
    * tests
    
    * Add missing parser
    kurkle authored Apr 25, 2021
    Copy the full SHA
    eded389 View commit details
  2. Update documentation.yml

    kurkle authored Apr 25, 2021
    Copy the full SHA
    e612e66 View commit details
  3. Update README (#459)

    kurkle authored Apr 25, 2021
    Copy the full SHA
    3974065 View commit details
  4. Update README.md

    kurkle authored Apr 25, 2021
    Copy the full SHA
    08b6fab View commit details
  5. Copy the full SHA
    5e10fa8 View commit details
  6. Update documentation.yml

    kurkle authored Apr 25, 2021
    Copy the full SHA
    78f0386 View commit details
  7. Copy the full SHA
    1e9c32d View commit details
  8. Copy the full SHA
    3b106e1 View commit details
  9. Refactor & export pan and zoom functions (#464)

    * Refactor & export pan and zoom functions
    
    * Fix + optimise
    
    * Fix tests
    
    * typo fix
    
    * lint err
    kurkle authored Apr 25, 2021
    Copy the full SHA
    15b227c View commit details
  10. Copy the full SHA
    e0e6b32 View commit details

Commits on Apr 26, 2021

  1. Copy the full SHA
    6a352cf View commit details
  2. Copy the full SHA
    99a2159 View commit details
  3. Copy the full SHA
    4b7c818 View commit details
  4. Fix hook parameters (#472)

    kurkle authored Apr 26, 2021
    Copy the full SHA
    80a398c View commit details

Commits on Apr 27, 2021

  1. Combine range options, add minimum scale range (#470)

    * Combine range options, add minimum scale range
    
    * Review feedback
    
    * range to minRange
    kurkle authored Apr 27, 2021
    Copy the full SHA
    c9268ea View commit details
  2. Bump version to beta.3 (#473)

    kurkle authored Apr 27, 2021
    Copy the full SHA
    b785842 View commit details

Commits on Apr 28, 2021

  1. Copy the full SHA
    7289efd View commit details
  2. Copy the full SHA
    ca62548 View commit details

Commits on Apr 30, 2021

  1. Copy the full SHA
    b746091 View commit details
  2. Fix category panning (#476)

    * Update category panning
    
    * Restore hammer-simulator for one test
    kurkle authored Apr 30, 2021
    Copy the full SHA
    c7360b1 View commit details
  3. Copy the full SHA
    a1609d5 View commit details
  4. Add zoomScale, rename doPan to pan, doZoom to zoom (#478)

    * Add zoomScale, rename doPan to pan, doZoom to zoom
    
    * Reduce zoomScale parameters
    kurkle authored Apr 30, 2021
    Copy the full SHA
    a9d8494 View commit details
  5. Copy the full SHA
    dda1f08 View commit details
  6. Copy the full SHA
    0c1c03e View commit details

Commits on May 1, 2021

  1. Add click-to-zoom example (#486)

    * Add click-to-zoom example
    
    * Fix flanky tests
    kurkle authored May 1, 2021
    Copy the full SHA
    9a8426e View commit details
  2. Fix calling of onZoomComplete from wheel event (#485)

    * Fix calling of onZoomComplete from wheel event
    
    * CC
    
    * Add test
    
    * CC2
    
    * Remove some unused code
    kurkle authored May 1, 2021
    Copy the full SHA
    756c898 View commit details
  3. Drag-to-zoom: filter clicks and pan.modifierKey (#484)

    * Drag-to-zoom: filter clicks and pan.modifierKey
    
    * CC
    kurkle authored May 1, 2021
    Copy the full SHA
    e6d15ca View commit details
  4. Add onPanStart and onZoomStart callbacks (#487)

    * Add onPanStart and onZoomStart callbacks
    
    * Split out preconditions from wheel
    
    * Add mouseup to cancelled events
    
    * cancel === false
    kurkle authored May 1, 2021
    Copy the full SHA
    e8bdf4e View commit details

Commits on May 2, 2021

  1. Fix drag-zoom and pan for non-linear scales (#488)

    * Fix drag-zoom and pan for non-linear scales
    
    * Fix non-linear pan against limit
    
    * Test and fix category zoom to and from 1 category
    
    * CC
    
    * Add test for category limits
    
    * Add reject test for drag zoom
    
    * Add api test
    kurkle authored May 2, 2021
    Copy the full SHA
    c2585ea View commit details
  2. Copy the full SHA
    48e16ec View commit details

Commits on May 5, 2021

  1. Copy the full SHA
    253d01a View commit details
  2. Copy the full SHA
    46926ee View commit details

Commits on May 6, 2021

  1. Adds drag effect options to the documentation (#497)

    * Adds drag effect options to the documentation
    
    * Fixes the object type separator
    
    * Changes the MD header
    stockiNail authored May 6, 2021
    Copy the full SHA
    a8521ec View commit details
  2. Copy the full SHA
    1e3b77f View commit details

Commits on May 7, 2021

  1. Add missing modifierKey properties to Options (#502)

    * Add missing properties to Options
    
    - Missing `modifierKey` to `PanOptions`
    - Missing `wheelModifierKey` to `ZoomOptions`
    
    * Update options.d.ts
    
    Apply lint fix (remove trailing spaces).
    jbelien authored May 7, 2021
    Copy the full SHA
    e0973e0 View commit details
Showing with 32,639 additions and 5,124 deletions.
  1. +7 −0 .devcontainer/Dockerfile
  2. +22 −0 .devcontainer/devcontainer.json
  3. +1 −0 .eslintignore
  4. +26 −10 .eslintrc.yml
  5. +10 −0 .github/dependabot.yml
  6. +37 −13 .github/workflows/ci.yml
  7. +1 −1 .github/workflows/compressed-size.yml
  8. +41 −0 .github/workflows/documentation.yml
  9. +64 −8 .github/workflows/publish-npm.yml
  10. +1 −1 .github/workflows/release-drafter.yml
  11. +27 −8 .gitignore
  12. +3 −0 .markdownlint.yml
  13. +8 −0 .prettierrc
  14. +18 −0 .swcrc-spec
  15. +14 −21 CONTRIBUTING.md
  16. +2 −1 LICENSE.md
  17. +1 −1 MAINTAINING.md
  18. +11 −134 README.md
  19. +170 −0 docs/.vuepress/config.ts
  20. BIN docs/.vuepress/public/favicon.ico
  21. BIN docs/.vuepress/public/favicon.png
  22. +41 −0 docs/.vuepress/public/hero.svg
  23. +34 −0 docs/guide/animations.md
  24. +96 −0 docs/guide/developers.md
  25. +19 −0 docs/guide/index.md
  26. +23 −0 docs/guide/integration.md
  27. +160 −0 docs/guide/options.md
  28. +48 −0 docs/guide/usage.md
  29. +7 −0 docs/index.md
  30. +2 −0 docs/samples/.eslintrc.yml
  31. +115 −0 docs/samples/api.md
  32. +132 −0 docs/samples/basic.md
  33. +94 −0 docs/samples/drag/category.md
  34. +111 −0 docs/samples/drag/linear-ratio.md
  35. +113 −0 docs/samples/drag/linear.md
  36. +173 −0 docs/samples/drag/log.md
  37. +115 −0 docs/samples/drag/reject-outside.md
  38. +130 −0 docs/samples/drag/time.md
  39. +121 −0 docs/samples/drag/timeseries.md
  40. +148 −0 docs/samples/fetch-data.md
  41. +115 −0 docs/samples/pan/region.md
  42. +105 −0 docs/samples/pan/toggle.md
  43. +98 −0 docs/samples/wheel/category-min-range.md
  44. +93 −0 docs/samples/wheel/category.md
  45. +157 −0 docs/samples/wheel/click-zoom.md
  46. +183 −0 docs/samples/wheel/log.md
  47. +122 −0 docs/samples/wheel/over-scale-mode.md
  48. +136 −0 docs/samples/wheel/time.md
  49. +17 −0 docs/scripts/defaults.js
  50. +23 −0 docs/scripts/register.js
  51. +122 −0 docs/scripts/utils.js
  52. +4 −0 jasmine.json
  53. +116 −0 karma.conf.cjs
  54. +0 −123 karma.conf.js
  55. +23,960 −2,848 package-lock.json
  56. +77 −30 package.json
  57. +59 −47 rollup.config.js
  58. +1 −1 samples/.eslintrc.yml
  59. +0 −95 samples/pan-bar.html
  60. +0 −94 samples/zoom-bar-x.html
  61. +0 −93 samples/zoom-bar.html
  62. +0 −93 samples/zoom-horizontal-bar.html
  63. +0 −199 samples/zoom-log.html
  64. +133 −0 samples/zoom-separately.html
  65. +0 −152 samples/zoom-time.html
  66. +0 −170 samples/zoom.html
  67. +30 −0 scripts/docs-config.sh
  68. +286 −0 src/core.ts
  69. +26 −0 src/defaults.ts
  70. +194 −0 src/hammer.ts
  71. +315 −0 src/handlers.ts
  72. +0 −1 src/index.esm.js
  73. +0 −6 src/index.js
  74. +38 −0 src/index.ts
  75. +6 −0 src/index.umd.ts
  76. +206 −0 src/options.ts
  77. +0 −670 src/plugin.js
  78. +157 −0 src/plugin.ts
  79. +27 −0 src/scale.types.test.ts
  80. +286 −0 src/scale.types.ts
  81. +64 −0 src/state.ts
  82. +6 −0 src/types.ts
  83. +29 −0 src/utils.test.ts
  84. +110 −0 src/utils.ts
  85. +1 −2 test/.eslintrc.yml
  86. +70 −0 test/fixtures/pan/category-x-1.js
  87. BIN test/fixtures/pan/category-x-1.png
  88. +70 −0 test/fixtures/pan/category-x-10.js
  89. BIN test/fixtures/pan/category-x-10.png
  90. +70 −0 test/fixtures/pan/category-x-25.js
  91. BIN test/fixtures/pan/category-x-25.png
  92. +79 −0 test/fixtures/pan/category-x-5.js
  93. BIN test/fixtures/pan/category-x-5.png
  94. +69 −0 test/fixtures/pan/category-x-50.js
  95. BIN test/fixtures/pan/category-x-50.png
  96. +66 −0 test/fixtures/pan/time-day-left.js
  97. BIN test/fixtures/pan/time-day-left.png
  98. +66 −0 test/fixtures/pan/time-day-right.js
  99. BIN test/fixtures/pan/time-day-right.png
  100. +68 −0 test/fixtures/zoom/category-x.js
  101. BIN test/fixtures/zoom/category-x.png
  102. +56 −0 test/fixtures/zoom/drag.js
  103. BIN test/fixtures/zoom/drag.png
  104. +57 −0 test/fixtures/zoom/dragDrawTime.js
  105. BIN test/fixtures/zoom/dragDrawTime.png
  106. +90 −0 test/fixtures/zoom/update-reset.js
  107. BIN test/fixtures/zoom/update-reset.png
  108. +72 −0 test/fixtures/zoom/zoom-reset.js
  109. BIN test/fixtures/zoom/zoom-reset.png
  110. +62 −14 test/index.js
  111. +587 −0 test/specs/api.spec.js
  112. +35 −25 test/specs/defaults.spec.js
  113. +4 −0 test/specs/fixtures.spec.js
  114. +17 −13 test/specs/module.spec.js
  115. +278 −0 test/specs/pan.spec.js
  116. +620 −0 test/specs/zoom.drag.spec.js
  117. +103 −0 test/specs/zoom.pinch.spec.js
  118. +0 −250 test/specs/zoom.spec.js
  119. +481 −0 test/specs/zoom.wheel.spec.js
  120. +2 −0 test/types/.eslintrc.yml
  121. +65 −0 test/types/exports.ts
  122. +15 −0 test/types/tsconfig.json
  123. +52 −0 tsconfig.json
  124. +37 −0 tsconfig.spec.json
7 changes: 7 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM node:23-alpine3.19
RUN apk add --no-cache \
git \
nano\
openssh

USER node
22 changes: 22 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "chartjs-plugin-zoom devcontainer",
"dockerFile": "Dockerfile",
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "npm install",
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
"settings": {},
"extensions": [
"eamodio.gitlens",
"EditorConfig.EditorConfig"
]
}
},
"containerEnv": {
"GIT_EDITOR": "nano"
},
"mounts": [
"type=bind,source=/home/${localEnv:USER}/.ssh,target=/home/node/.ssh,readonly"
]
}
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist/**/*
36 changes: 26 additions & 10 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,36 @@
extends:
- chartjs
- plugin:es/no-new-in-es2019
- plugin:markdown/recommended
- plugin:@typescript-eslint/recommended

env:
es6: true
browser: true
node: true
parser: "@typescript-eslint/parser"

parserOptions:
ecmaVersion: 2018
ecmaVersion: 2022
sourceType: module
ecmaFeatures:
impliedStrict: true
modules: true

plugins: ['html', 'es']
env:
es2022: true
browser: true
node: true
jasmine: true

plugins:
- "@typescript-eslint"
- prettier
- html

rules:
prettier/prettier: "error"
semi: ["error", "never"]
complexity: ["warn", 10]
max-statements: ["warn", 30]
no-var: "warn"
prefer-const: ["warn", {"destructuring": "all"}]
# turning off things conflicting with prettier
indent: "off"
comma-dangle: "off"
comma-spacing: "off"
comma-style: "off"
object-curly-spacing: "off"
space-before-function-paren: "off"
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
50 changes: 37 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -7,8 +7,7 @@ on:
- master

jobs:
build:

ci:
runs-on: ${{ matrix.os }}

strategy:
@@ -17,39 +16,64 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v1
- run: |
npm ci
npm run build
uses: actions/setup-node@v4
with:
node-version: 20

- name: install
run: npm ci

- name: lint
run: npm run lint

- name: typecheck
run: npm run typecheck

- name: build
run: npm run build

- name: test
run: |
if [ "${{ runner.os }}" == "Windows" ]; then
npm test
else
xvfb-run --auto-servernum npm test
fi
shell: bash

- name: Coveralls Paraller - Unit
if: matrix.os == 'ubuntu-latest'
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.github_token }}
file: './coverage/unit/lcov.info'
flag-name: unit
parallel: true

- name: Coveralls Parallel - Chrome
uses: coverallsapp/github-action@master
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: './coverage/chrome/lcov.info'
file: './coverage/chrome/lcov.info'
flag-name: ${{ matrix.os }}-chrome
parallel: true

- name: Coveralls Parallel - Firefox
uses: coverallsapp/github-action@master
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: './coverage/firefox/lcov.info'
file: './coverage/firefox/lcov.info'
flag-name: ${{ matrix.os }}-firefox
parallel: true

finish:
needs: build
needs: ci
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
2 changes: 1 addition & 1 deletion .github/workflows/compressed-size.yml
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: preactjs/compressed-size-action@v2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
41 changes: 41 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: documentation

on:
pull_request:
branches: [master]
push:
branches: [master]

jobs:
checks:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Test Build
run: |
npm ci
./scripts/docs-config.sh master
npm run docs
gh-release:
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Build
run: |
npm ci
./scripts/docs-config.sh master
npm run docs
- name: Release to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GH_AUTH_TOKEN }}
publish_dir: dist/docs
destination_dir: master
72 changes: 64 additions & 8 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
@@ -18,9 +18,11 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 20
- name: Test
run: |
npm ci
@@ -30,26 +32,29 @@ jobs:
needs: [test, setup]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 12
node-version: 20
registry-url: https://registry.npmjs.org/
- name: Setup and build
run: |
npm ci
npm run build
npm pack
- name: Publish @next
run: npm publish --tag next
if: "github.event.release.prerelease"
if: github.event.release.prerelease == true
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}

- name: Publish @latest
run: npm publish --tag latest --dry-run
if: "!github.event.release.prerelease"
run: npm publish --tag latest
if: github.event.release.prerelease == false
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}

- name: Upload chartjs-plugin-zoom.tgz
uses: actions/upload-release-asset@v1
env:
@@ -59,6 +64,7 @@ jobs:
asset_path: ${{ format('chartjs-plugin-zoom-{0}.tgz', needs.setup.outputs.version) }}
asset_name: ${{ format('chartjs-plugin-zoom-{0}.tgz', needs.setup.outputs.version) }}
asset_content_type: application/gzip

- name: Upload chartjs-plugin-zoom.js
uses: actions/upload-release-asset@v1
env:
@@ -68,6 +74,7 @@ jobs:
asset_path: dist/chartjs-plugin-zoom.js
asset_name: chartjs-plugin-zoom.js
asset_content_type: application/javascript

- name: Upload chartjs-plugin-zoom.min.js
uses: actions/upload-release-asset@v1
env:
@@ -77,3 +84,52 @@ jobs:
asset_path: dist/chartjs-plugin-zoom.min.js
asset_name: chartjs-plugin-zoom.min.js
asset_content_type: application/javascript

- name: Build docs (version)
run: |
./scripts/docs-config.sh "$VERSION" release
npm run docs
env:
VERSION: ${{ needs.setup.outputs.version }}

- name: Release to GitHub Pages (version)
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GH_AUTH_TOKEN }}
publish_dir: dist/docs
destination_dir: ${{ needs.setup.outputs.version }}

publish-docs:
needs: [test, setup]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/

- name: Build docs (latest/next)
run: |
npm ci
npm run build
./scripts/docs-config.sh "$VERSION"
npm run docs
env:
VERSION: ${{ needs.setup.outputs.version }}

- name: Release to GitHub Pages (latest)
if: github.event.release.prerelease == false
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GH_AUTH_TOKEN }}
publish_dir: dist/docs
destination_dir: latest

- name: Release to GitHub Pages (next)
if: github.event.release.prerelease == true
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GH_AUTH_TOKEN }}
publish_dir: dist/docs
destination_dir: next
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -17,6 +17,6 @@ jobs:
needs: correct_repository
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
- uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35 changes: 27 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,30 @@
.DS_Store

node_modules/*
custom/*
# Deployment
/build
/coverage
/custom
/dist
/gh-pages

docs/index.md
# Node.js
node_modules/
npm-debug.log*

coverage/*
# Docs
.cache-loader
build/
# generated typedocs
docs/api

nbproject/*
dist/
# Development
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
.idea
.project
.settings
.vscode
*.log
*.swp
*.stackdump
3 changes: 3 additions & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
MD013: false # line-length
MD033: false # inline HTML
MD041: false # first line heading
Loading