Skip to content

Commit 2c96a69

Browse files
committed
Modernize the codebase
- Drop support for node 16 - Drop support for iife - Drop support for legacy browsers - Drop Bower - No bundling - index.js should work out of the box for all modern use cases - maybe I’ll add a .min.js version at some point - Update dependencies - Make mathup an optional peer dependency - Move test framwork to node --test - Migrate to eslint 9 - Move from travis to github actions - Add typescript annotations and export type declarations Other Breaking Changes: - Default delimiters are now `$` and `$$` for inline and block math respectively. - Default renderer is now Mathup, which has a slightly different syntax and output. - Passing options to the default mathup renderer has been renamed from `renderingOptions` to `defaultRendererOptions`.
1 parent 082e48a commit 2c96a69

23 files changed

+2706
-6225
lines changed

.eslintrc

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

.github/workflows/ci.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
types: [opened, synchronize, reopened]
9+
10+
jobs:
11+
check:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Use Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: lts/*
21+
check-latest: true
22+
cache: npm
23+
24+
- name: Install Dependencies
25+
run: npm ci
26+
27+
- name: Check
28+
run: npm run check
29+
30+
test:
31+
runs-on: ubuntu-latest
32+
33+
steps:
34+
- uses: actions/checkout@v4
35+
36+
- name: Use Node.js
37+
uses: actions/setup-node@v4
38+
with:
39+
node-version: lts/*
40+
check-latest: true
41+
cache: npm
42+
43+
- name: Install Dependencies
44+
run: npm ci
45+
46+
- name: Test
47+
run: npm run test:coverage
48+
49+
lint:
50+
runs-on: ubuntu-latest
51+
52+
steps:
53+
- uses: actions/checkout@v4
54+
55+
- name: Use Node.js
56+
uses: actions/setup-node@v4
57+
with:
58+
node-version: lts/*
59+
check-latest: true
60+
cache: npm
61+
62+
- name: Install Dependencies
63+
run: npm ci
64+
65+
- name: Lint
66+
run: npm run lint
67+
68+
prettier:
69+
runs-on: ubuntu-latest
70+
71+
steps:
72+
- uses: actions/checkout@v4
73+
74+
- name: Use Node.js
75+
uses: actions/setup-node@v4
76+
with:
77+
node-version: lts/*
78+
check-latest: true
79+
cache: npm
80+
81+
- name: Install Dependencies
82+
run: npm ci
83+
84+
- name: Prettier
85+
run: npm run prettier:ci

.github/workflows/coverage-badge.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Coverage Badge
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Use Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: lts/*
27+
check-latest: true
28+
cache: npm
29+
30+
- name: Install dependencies
31+
run: npm ci
32+
33+
- name: Build docs
34+
run: npm run test:coverage-badge
35+
36+
- name: Upload static files as artifact
37+
id: deployment
38+
uses: actions/upload-pages-artifact@v3
39+
with:
40+
path: coverage/
41+
42+
deploy:
43+
needs: build
44+
45+
runs-on: ubuntu-latest
46+
47+
environment:
48+
name: github-pages
49+
url: ${{ steps.deployment.outputs.page_url }}
50+
51+
steps:
52+
- name: Setup Pages
53+
uses: actions/configure-pages@v5
54+
55+
- name: Deploy to GitHub Pages
56+
id: deployment
57+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
node_modules/
2-
npm-debug.log
2+
npm-debug.log
3+
coverage/
4+
types/

.npmignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1+
.github/
2+
**/*.test.js
3+
**/*.config.js
4+
coverage/
15
test/
2-
.eslintrc

.travis.yml

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

0 commit comments

Comments
 (0)