|
@@ -64,7 +64,6 @@ function getModuleDirectory(moduleName) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const mathjaxDir = getModuleDirectory('mathjax')
|
|
const mathjaxDir = getModuleDirectory('mathjax')
|
|
|
-const mathjax3Dir = getModuleDirectory('mathjax-3')
|
|
|
|
|
|
|
|
|
|
const pdfjsVersions = ['pdfjs-dist213', 'pdfjs-dist401']
|
|
const pdfjsVersions = ['pdfjs-dist213', 'pdfjs-dist401']
|
|
|
|
|
|
|
@@ -77,13 +76,6 @@ if (MATHJAX_VERSION !== PackageVersions.version.mathjax) {
|
|
|
)
|
|
)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-const MATHJAX_3_VERSION = require('mathjax-3/package.json').version
|
|
|
|
|
-if (MATHJAX_3_VERSION !== PackageVersions.version['mathjax-3']) {
|
|
|
|
|
- throw new Error(
|
|
|
|
|
- '"mathjax-3" version de-synced, update services/web/app/src/infrastructure/PackageVersions.js'
|
|
|
|
|
- )
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
module.exports = {
|
|
module.exports = {
|
|
|
// Defines the "entry point(s)" for the application - i.e. the file which
|
|
// Defines the "entry point(s)" for the application - i.e. the file which
|
|
|
// bootstraps the application
|
|
// bootstraps the application
|
|
@@ -277,57 +269,38 @@ module.exports = {
|
|
|
// https://www.npmjs.com/package/mathjax#user-content-hosting-your-own-copy-of-the-mathjax-components
|
|
// https://www.npmjs.com/package/mathjax#user-content-hosting-your-own-copy-of-the-mathjax-components
|
|
|
{
|
|
{
|
|
|
from: 'es5/tex-svg-full.js',
|
|
from: 'es5/tex-svg-full.js',
|
|
|
- to: `js/libs/mathjax-3-${PackageVersions.version['mathjax-3']}/es5`,
|
|
|
|
|
|
|
+ to: `js/libs/mathjax-${PackageVersions.version.mathjax}/es5`,
|
|
|
toType: 'dir',
|
|
toType: 'dir',
|
|
|
- context: mathjax3Dir,
|
|
|
|
|
|
|
+ context: mathjaxDir,
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
from: 'es5/input/tex/extensions/**/*.js',
|
|
from: 'es5/input/tex/extensions/**/*.js',
|
|
|
- to: `js/libs/mathjax-3-${PackageVersions.version['mathjax-3']}`,
|
|
|
|
|
|
|
+ to: `js/libs/mathjax-${PackageVersions.version.mathjax}`,
|
|
|
toType: 'dir',
|
|
toType: 'dir',
|
|
|
- context: mathjax3Dir,
|
|
|
|
|
|
|
+ context: mathjaxDir,
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
from: 'es5/ui/**/*',
|
|
from: 'es5/ui/**/*',
|
|
|
- to: `js/libs/mathjax-3-${PackageVersions.version['mathjax-3']}`,
|
|
|
|
|
|
|
+ to: `js/libs/mathjax-${PackageVersions.version.mathjax}`,
|
|
|
toType: 'dir',
|
|
toType: 'dir',
|
|
|
- context: mathjax3Dir,
|
|
|
|
|
- },
|
|
|
|
|
- { from: 'MathJax.js', to: 'js/libs/mathjax', context: mathjaxDir },
|
|
|
|
|
- { from: 'config/**/*', to: 'js/libs/mathjax', context: mathjaxDir },
|
|
|
|
|
- {
|
|
|
|
|
- from: 'extensions/**/*',
|
|
|
|
|
- globOptions: {
|
|
|
|
|
- // https://github.com/mathjax/MathJax/issues/2403
|
|
|
|
|
- ignore: ['**/mathmaps/*.js'],
|
|
|
|
|
- },
|
|
|
|
|
- to: 'js/libs/mathjax',
|
|
|
|
|
context: mathjaxDir,
|
|
context: mathjaxDir,
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- from: 'localization/en/**/*',
|
|
|
|
|
- to: 'js/libs/mathjax',
|
|
|
|
|
- context: mathjaxDir,
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- from: 'jax/output/HTML-CSS/fonts/TeX/**/*',
|
|
|
|
|
- to: 'js/libs/mathjax',
|
|
|
|
|
- context: mathjaxDir,
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- from: 'jax/output/HTML-CSS/**/*.js',
|
|
|
|
|
- to: 'js/libs/mathjax',
|
|
|
|
|
|
|
+ from: 'es5/a11y/**/*',
|
|
|
|
|
+ to: `js/libs/mathjax-${PackageVersions.version.mathjax}`,
|
|
|
|
|
+ toType: 'dir',
|
|
|
context: mathjaxDir,
|
|
context: mathjaxDir,
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- from: 'jax/element/**/*',
|
|
|
|
|
- to: 'js/libs/mathjax',
|
|
|
|
|
|
|
+ from: 'es5/input/mml.js',
|
|
|
|
|
+ to: `js/libs/mathjax-${PackageVersions.version.mathjax}/es5/input`,
|
|
|
|
|
+ toType: 'dir',
|
|
|
context: mathjaxDir,
|
|
context: mathjaxDir,
|
|
|
},
|
|
},
|
|
|
- { from: 'jax/input/**/*', to: 'js/libs/mathjax', context: mathjaxDir },
|
|
|
|
|
{
|
|
{
|
|
|
- from: 'fonts/HTML-CSS/TeX/woff/*',
|
|
|
|
|
- to: 'js/libs/mathjax',
|
|
|
|
|
|
|
+ from: 'es5/sre/**/*',
|
|
|
|
|
+ to: `js/libs/mathjax-${PackageVersions.version.mathjax}`,
|
|
|
|
|
+ toType: 'dir',
|
|
|
context: mathjaxDir,
|
|
context: mathjaxDir,
|
|
|
},
|
|
},
|
|
|
...pdfjsVersions.flatMap(version => {
|
|
...pdfjsVersions.flatMap(version => {
|