Skip to content

Commit

Permalink
docs: Update development instructions
Browse files Browse the repository at this point in the history
#taskid 39052
  • Loading branch information
carla-at-wiris committed Oct 2, 2023
1 parent 70efc70 commit 2f31c67
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 32 deletions.
34 changes: 20 additions & 14 deletions docs/development/compiling/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,43 @@ In order to offer cross-browser compatibility and the latest features, most of t

## Table of contents

- [Compiling all packages](#compiling-all-packages)
- [Compiling individual packages](#compiling-individual-packages)
- [Pointing to your own back-end](#pointing-to-your-own-back-end)
- [Cleaning up](#cleaning-up)
- [Bootstrap dependencies](#bootstrap-dependencies)
- [Compile individual packages](#compile-individual-packages)
- [Point to your own back-end](#point-to-your-own-back-end)
- [Clean up](#clean-up)

## Compiling all packages
## Requirements

When running the following command described in the [Bootstrapping](../../README.md#Bootstrapping) section:
* [**yarn**](https://classic.yarnpkg.com/lang/en/docs/install/#debian-stable) (*currently: v1.22.19*)
* [**nx**](https://nx.dev/getting-started/installation#installing-nx-globally) (*latest*) - Optional

## Bootstrap dependencies

First run the following command described in the [Bootstrapping](../../README.md#Bootstrapping) section:

```sh
$ yarn
```

the monorepo will bootstrap all the packages in the monorepo and also compile all the plugins for you.
the monorepo will bootstrap all the packages in the monorepo and the npm dependencies.

## Compiling individual packages
## Compile individual packages

To compile a single packages, run:

```sh
$ yarn build <PACKAGE>
$ nx build <PACKAGE>
```

You can also build the packages in development mode:

```sh
$ yarn build-dev <PACKAGE>
$ 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
Expand All @@ -47,7 +55,7 @@ Where PACKAGE can be:
* tinymce5
* tinymce6

## Pointing to your own back-end
## 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:

Expand All @@ -58,16 +66,14 @@ $ SERVICE_PROVIDER_URI=[url] SERVICE_PROVIDER_SERVER=[tech] yarn build

Where `[tech]` is one of:

- `aspx`
- `java`
- `php`
- `ruby`

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.

## Cleaning up
## Clean up

To delete files generated during the compilation process, run:

Expand Down
10 changes: 10 additions & 0 deletions docs/development/demos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,22 @@ This document explains what to do if you are modifying the source code of the pl

All the commands can be executed either from the root of the project, or from the demo path. We recommend running them on the project root to avoid complexity.

## Requirements

* [**yarn**](https://classic.yarnpkg.com/lang/en/docs/install/#debian-stable) (*currently: v1.22.19*)
* [**nx**](https://nx.dev/getting-started/installation#installing-nx-globally) (*latest*) - Optional

## Build and start a demo in development mode

Assuming that you already executed the `yarn` command, you'll have to build the desired package and start the demo:

```js
$ nx build <EDITOR>
$ nx start <FRAMEWORK>-<EDITOR>
```

> In case you haven't installed `nx`, you'll have to add `yarn` at the beggining of each one of the previous commands.
| FRAMEWORK | Editor and Version | EDITOR/PACKAGE |
|-----------|---------------------|--------------------------------------------------------------------|
| html | CKEditor V4 | [ckeditor4](../../demos/html/ckeditor4) |
Expand Down
4 changes: 2 additions & 2 deletions packages/devkit/doc/src/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ To integrate MathType, please follow the steps below (you may adjust the example
genericIntegrationInstance.init();
genericIntegrationInstance.listeners.fire('onTargetReady', {});
WirisPlugin.currentInstance = this.wiris_generic;
WirisPlugin.currentInstance = genericIntegrationInstance;
</script>
```
This is the main step of the integration, doing the following:
Expand Down Expand Up @@ -73,7 +73,7 @@ The complete HTML code of the previuos example is the following:
genericIntegrationInstance.init();
genericIntegrationInstance.listeners.fire('onTargetReady', {});
WirisPlugin.currentInstance = this.wiris_generic;
WirisPlugin.currentInstance = genericIntegrationInstance;
</script>
</html>
```
Expand Down
8 changes: 4 additions & 4 deletions packages/devkit/doc/src/services_generic.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ To install the Java services follow the steps below:
genericIntegrationInstance.init();
genericIntegrationInstance.listeners.fire('onTargetReady', {});
WirisPlugin.currentInstance = this.wiris_generic;
WirisPlugin.currentInstance = genericIntegrationInstance;
</script>
```

Expand Down Expand Up @@ -60,7 +60,7 @@ To install the PHP services follow the steps below:
genericIntegrationInstance.init();
genericIntegrationInstance.listeners.fire('onTargetReady', {});
WirisPlugin.currentInstance = this.wiris_generic;
WirisPlugin.currentInstance = genericIntegrationInstance;
</script>
```
Expand Down Expand Up @@ -91,7 +91,7 @@ To install the .NET services follow the steps below:
genericIntegrationInstance.init();
genericIntegrationInstance.listeners.fire('onTargetReady', {});
WirisPlugin.currentInstance = this.wiris_generic;
WirisPlugin.currentInstance = genericIntegrationInstance;
</script>
```
Expand Down Expand Up @@ -125,6 +125,6 @@ To install the Ruby on Rails services follow the steps below:
genericIntegrationInstance.init();
genericIntegrationInstance.listeners.fire('onTargetReady', {});
WirisPlugin.currentInstance = this.wiris_generic;
WirisPlugin.currentInstance = genericIntegrationInstance;
</script>
```
12 changes: 6 additions & 6 deletions packages/generic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ To integrate MathType, please follow the steps below. Please, note you may adjus
genericIntegrationInstance.init();
genericIntegrationInstance.listeners.fire('onTargetReady', {});
WirisPlugin.currentInstance = this.wiris_generic;
WirisPlugin.currentInstance = genericIntegrationInstance;
</script>
```

Expand Down Expand Up @@ -97,7 +97,7 @@ After following these steps, you should have something like this:
genericIntegrationInstance.init();
genericIntegrationInstance.listeners.fire('onTargetReady', {});
WirisPlugin.currentInstance = this.wiris_generic;
WirisPlugin.currentInstance = genericIntegrationInstance;
</script>
</body>
</html>
Expand Down Expand Up @@ -203,7 +203,7 @@ To install the Java services, please, follow the steps below:
genericIntegrationInstance.init();
genericIntegrationInstance.listeners.fire('onTargetReady', {});
WirisPlugin.currentInstance = this.wiris_generic;
WirisPlugin.currentInstance = genericIntegrationInstance;
</script>
```

Expand Down Expand Up @@ -237,7 +237,7 @@ To install the PHP services, please, follow the steps below:
genericIntegrationInstance.init();
genericIntegrationInstance.listeners.fire('onTargetReady', {});
WirisPlugin.currentInstance = this.wiris_generic;
WirisPlugin.currentInstance = genericIntegrationInstance;
</script>
```

Expand Down Expand Up @@ -271,7 +271,7 @@ To install the ASP .NET services, please, follow the steps below:
genericIntegrationInstance.init();
genericIntegrationInstance.listeners.fire('onTargetReady', {});
WirisPlugin.currentInstance = this.wiris_generic;
WirisPlugin.currentInstance = genericIntegrationInstance;
</script>
```

Expand Down Expand Up @@ -309,7 +309,7 @@ To install the Ruby on Rails services, please, follow the steps below:
genericIntegrationInstance.init();
genericIntegrationInstance.listeners.fire('onTargetReady', {});
WirisPlugin.currentInstance = this.wiris_generic;
WirisPlugin.currentInstance = genericIntegrationInstance;
</script>
```

Expand Down
4 changes: 2 additions & 2 deletions packages/generic/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ To integrate MathType, please follow the steps below (you may adjust the example
genericIntegrationInstance.init();
genericIntegrationInstance.listeners.fire('onTargetReady', {});
WirisPlugin.currentInstance = this.wiris_generic;
WirisPlugin.currentInstance = genericIntegrationInstance;
</script>
```
This is the main step of the integration, doing the following:
Expand Down Expand Up @@ -73,7 +73,7 @@ The complete HTML code of the previuos example is the following:
genericIntegrationInstance.init();
genericIntegrationInstance.listeners.fire('onTargetReady', {});
WirisPlugin.currentInstance = this.wiris_generic;
WirisPlugin.currentInstance = genericIntegrationInstance;
</script>
</html>
```
Expand Down
8 changes: 4 additions & 4 deletions packages/generic/services.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ To install the Java services follow the steps below:
genericIntegrationInstance.init();
genericIntegrationInstance.listeners.fire('onTargetReady', {});
WirisPlugin.currentInstance = this.wiris_generic;
WirisPlugin.currentInstance = genericIntegrationInstance;
</script>
```

Expand All @@ -54,7 +54,7 @@ To install the PHP services follow the steps below:
genericIntegrationInstance.init();
genericIntegrationInstance.listeners.fire('onTargetReady', {});
WirisPlugin.currentInstance = this.wiris_generic;
WirisPlugin.currentInstance = genericIntegrationInstance;
</script>
```

Expand All @@ -80,7 +80,7 @@ To install the .NET services follow the steps below:
genericIntegrationInstance.init();
genericIntegrationInstance.listeners.fire('onTargetReady', {});
WirisPlugin.currentInstance = this.wiris_generic;
WirisPlugin.currentInstance = genericIntegrationInstance;
</script>
```

Expand Down Expand Up @@ -110,5 +110,5 @@ To install the Ruby on Rails services follow the steps below:
genericIntegrationInstance.init();
genericIntegrationInstance.listeners.fire('onTargetReady', {});
WirisPlugin.currentInstance = this.wiris_generic;
WirisPlugin.currentInstance = genericIntegrationInstance;
</script> ```

0 comments on commit 2f31c67

Please sign in to comment.