Skip to content

Commit c9054c2

Browse files
authored
Merge pull request #1331 from mathjax/develop
The new version 4.0
2 parents 844ad75 + be4116a commit c9054c2

File tree

992 files changed

+134800
-44925
lines changed

Some content is hidden

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

992 files changed

+134800
-44925
lines changed

.github/workflows/docs.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
8+
# Allows you to run this workflow manually from the Actions tab
9+
workflow_dispatch:
10+
11+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
18+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
19+
concurrency:
20+
group: "pages"
21+
cancel-in-progress: false
22+
23+
jobs:
24+
docs:
25+
environment:
26+
name: github-pages
27+
url: ${{ steps.deployment.outputs.page_url }}
28+
runs-on: ubuntu-latest
29+
name: Generate Code Docs
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v4
33+
34+
- uses: pnpm/action-setup@v4
35+
name: Install pnpm
36+
with:
37+
version: 10
38+
run_install: false
39+
40+
- name: Install packages
41+
run: pnpm i
42+
43+
- name: Build docs
44+
run: pnpm typedoc
45+
46+
- name: Upload artifact
47+
uses: actions/upload-pages-artifact@v3
48+
with:
49+
# Upload docs folder
50+
path: './docs'
51+
52+
- name: Deploy to GitHub Pages
53+
id: deployment
54+
uses: actions/deploy-pages@v4

.github/workflows/publish.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
setup:
9+
runs-on: ubuntu-latest
10+
name: Build and publish MathJax
11+
permissions:
12+
contents: read
13+
id-token: write
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- uses: pnpm/action-setup@v4
19+
name: Install pnpm
20+
with:
21+
version: 10
22+
run_install: false
23+
registry-url: 'https://registry.npmjs.org'
24+
25+
- name: Install packages
26+
run: pnpm i
27+
28+
- name: Build MathJax
29+
run: |
30+
./components/bin/version
31+
pnpm -s link:src
32+
pnpm -s build-all
33+
34+
- name: Temp fix to publish
35+
run: |
36+
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
37+
echo "always-auth=true" >> ~/.npmrc
38+
39+
- name: Publish to npmjs
40+
run: pnpm publish --access public --no-git-checks
41+
env:
42+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
43+

.github/workflows/test.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
pull_request:
8+
branches:
9+
- develop
10+
11+
jobs:
12+
setup:
13+
runs-on: ubuntu-latest
14+
name: Compile and test MathJax
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- uses: pnpm/action-setup@v4
20+
name: Install pnpm
21+
with:
22+
version: 10
23+
run_install: false
24+
25+
- name: Install packages
26+
run: |
27+
pnpm -r i
28+
pnpm -s link:src
29+
30+
- name: Compile MathJax
31+
run: |
32+
pnpm -s mjs:compile
33+
components/bin/makeAll --mjs --terse --build components/mjs
34+
pnpm -s cjs:compile
35+
pnpm -s cjs:components:src:build
36+
components/bin/makeAll --cjs --terse --build components/cjs
37+
pnpm -s copy:pkg cjs
38+
39+
- name: Build tests
40+
run: pnpm tsc -p testsuite/tsconfig.json
41+
42+
- name: Run tests
43+
run: pnpm -s test:gh
44+
45+
- name: Upload coverage reports to Codecov
46+
uses: codecov/codecov-action@v5
47+
with:
48+
token: ${{ secrets.CODECOV_TOKEN }}
49+
slug: mathjax/MathJax-src

.gitignore

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
*~
22
node_modules
3-
components/src/**/lib
4-
js
5-
es5
3+
coverage
4+
/components/mjs/**/lib
5+
/components/cjs
6+
/cjs
7+
/mjs
8+
/bundle
9+
/bundle-cjs
10+
/testsuite/js
11+
/lab/sre.js

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm lint-staged

.husky/pre-push

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# pnpm test

.prettierrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"singleQuote": true,
3+
"trailingComma": "es5"
4+
}

.travis.yml

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

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33
![GitHub release version](https://img.shields.io/github/v/release/mathjax/MathJax-src.svg?sort=semver)
44
![GitHub release version (v2)](https://img.shields.io/github/package-json/v/mathjax/MathJax/legacy-v2.svg?label=release-v2)
55
![NPM version](https://img.shields.io/npm/v/mathjax.svg?style=flat)
6-
<a href="http://www.numfocus.org">![powered by NumFOCUS](https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat)</a>
76
![jsdelivr rank](https://flat.badgen.net/jsdelivr/rank/npm/mathjax?color=green)
87
![jsDelivr hits (npm)](https://img.shields.io/jsdelivr/npm/hm/mathjax)
98
![npm monthly downloads (full)](https://img.shields.io/npm/dm/mathjax?label=npm)
109
![npm monthly downloads (full)](https://img.shields.io/npm/dm/mathjax-full?label=npm%20%28full%29)
1110
![npm total downloads](https://img.shields.io/npm/dt/mathjax.svg?style=flat&label=npm%20total)
1211
![npm total downloads](https://img.shields.io/npm/dt/mathjax-full.svg?style=flat&label=npm%20total%20%28full%29)
12+
![test workflow](https://github.com/MathJax/MathJax-src/actions/workflows/test.js.yml/badge.svg?branch=develop)
13+
[![codecov](https://codecov.io/gh/mathjax/mathjax-src/branch/develop/graph/badge.svg)](https://codecov.io/gh/mathjax/mathjax-src/tree/develop)
1314

1415
## Beautiful math in all browsers
1516

0 commit comments

Comments
 (0)