MathType Web Integrations → Documentation → Development guide → Compiling the packages
The MathType Web plugins consist mostly of JavaScript. In order to offer cross-browser compatibility and the latest features, most of these plugins need to be "compiled" using Webpack.
First run the following command described in the Bootstrapping section:
$ yarn
the monorepo will bootstrap all the packages in the monorepo and the npm dependencies.
To compile a single packages, run:
$ nx build <PACKAGE>
You can also build the packages in development mode:
$ nx build-dev <PACKAGE>
In case you haven't installed
nx
, you'll have to addyarn
at the beginning of each one of the previous commands.
Where PACKAGE can be:
- ckeditor4
- ckeditor5
- froala
- generic
- tinymce5
- tinymce6
- tinymce7
If your website hosts its own MathType Web services, instead of using the wiris.net services, then you must pass a flag indicating which technology your server uses (ASPX, Java, Ruby, or PHP), run the following command in the desired package folder:
$ SERVICE_PROVIDER_URI=[url] SERVICE_PROVIDER_SERVER=[tech] yarn build
Where [tech]
is one of:
java
php
and [url]
is the relative address to the main endpoint of the MathType Web services that you are hosting (e.g. integration
if your PHP services are in the integration/
directory).
You can use build-dev
instead of build
to build the package in development mode.
To delete files generated during the compilation process, run:
$ yarn clean