Skip to content

Latest commit

 

History

History
80 lines (51 loc) · 2.22 KB

File metadata and controls

80 lines (51 loc) · 2.22 KB

Compiling the packages

MathType Web IntegrationsDocumentationDevelopment 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.

Table of contents

Requirements

  • yarn (currently: v1.22.19)
  • nx (latest) - Optional

Bootstrap dependencies

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.

Compile individual packages

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 add yarn at the beggining of each one of the previous commands.

Where PACKAGE can be:

  • ckeditor4
  • ckeditor5
  • froala
  • generic
  • tinymce5
  • tinymce6

Point to your own back-end

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.

Clean up

To delete files generated during the compilation process, run:

$ yarn clean