@wiris/mathtype-tinymce7 8.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/project.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "tinymce7",
3
+ "$schema": "../../node_modules/nx/schemas/project-schema.json",
4
+ "sourceRoot": "package/tinymce7/src",
5
+ "targets": {
6
+ "build": {
7
+ "executor": "@nx/webpack:webpack",
8
+ "dependsOn": [],
9
+ "outputs": ["{options.outputPath}"],
10
+ "options": {
11
+ "main": "demos/packages/tinymce7/global.js",
12
+ "outputPath": "dist",
13
+ "tsConfig": "tsconfig.app.json",
14
+ "generateIndexHtml": false,
15
+ "index": " ",
16
+ "webpackConfig": "packages/tinymce7/webpack.config.js"
17
+ }
18
+ },
19
+ "start": {
20
+ "executor": "@nx/webpack:dev-server",
21
+ "options": {
22
+ "buildTarget": "tinymce7:build",
23
+ "webpackConfig": "packages/tinymce7/webpack.config.js"
24
+ }
25
+ },
26
+ "lint": {
27
+ "executor": "@nx/linter:eslint",
28
+ "options": {
29
+ "eslintConfig": "./.eslintrc.js",
30
+ "lintFilePatterns": ["packages/tinymce7/**/*.{ts,tsx,js,jsx}"]
31
+ },
32
+ "outputs": ["{options.outputFile}"]
33
+ }
34
+ }
35
+ }
@@ -0,0 +1,99 @@
1
+ const path = require("path");
2
+ const webpack = require("webpack");
3
+ const TerserPlugin = require("terser-webpack-plugin");
4
+ const { CleanWebpackPlugin } = require("clean-webpack-plugin");
5
+
6
+ module.exports = (config, context) => {
7
+ return {
8
+ entry: {
9
+ app: path.resolve(__dirname, "./global.js"),
10
+ },
11
+ output: {
12
+ path: path.resolve(__dirname, ""),
13
+ filename: "./plugin.min.js",
14
+ globalObject: "this",
15
+ },
16
+ devServer: {
17
+ devMiddleware: {
18
+ writeToDisk: true,
19
+ },
20
+ static: {
21
+ directory: path.join(__dirname, "./"),
22
+ },
23
+ onListening:
24
+ config && config.devServer ? config.devServer.onListening : "",
25
+ hot: true,
26
+ port: 9008,
27
+ host: "0.0.0.0",
28
+ },
29
+ // Set watch to true for dev purposes.
30
+ watch: false,
31
+ optimization: {
32
+ minimize: true,
33
+ minimizer: [
34
+ new TerserPlugin({
35
+ // These options prevent Terser from generating a LICENSE.txt file
36
+ terserOptions: {
37
+ format: {
38
+ comments: false,
39
+ },
40
+ },
41
+ extractComments: false,
42
+ }),
43
+ ],
44
+ },
45
+ mode: "none",
46
+ module: {
47
+ rules: [
48
+ {
49
+ // Rule to translate ES5 javascript files to ES6.
50
+ test: /\.js$/,
51
+ exclude:
52
+ /node_modules\/(?!(@wiris\/mathtype-html-integration-devkit)\/).*/,
53
+ use: {
54
+ loader: "babel-loader",
55
+ options: {
56
+ presets: ["@babel/env"],
57
+ },
58
+ },
59
+ },
60
+ {
61
+ test: /\.wasm$/,
62
+ type: "asset/inline",
63
+ },
64
+ {
65
+ test: /\.css$/,
66
+ use: ["style-loader", "css-loader"],
67
+ },
68
+ {
69
+ test: /\.(png|jpg|gif)$/i,
70
+ type: "asset/inline",
71
+ },
72
+ {
73
+ // For the modal close, minimize, maximize icons
74
+ test: /\.svg$/,
75
+ type: "asset/source",
76
+ },
77
+ ],
78
+ },
79
+ stats: {
80
+ colors: true,
81
+ },
82
+ experiments: {
83
+ topLevelAwait: true,
84
+ asyncWebAssembly: true,
85
+ },
86
+ plugins: [
87
+ new webpack.EnvironmentPlugin({
88
+ SERVICE_PROVIDER_URI: "https://www.wiris.net/demo/plugins/app",
89
+ SERVICE_PROVIDER_SERVER: "java",
90
+ }),
91
+ new CleanWebpackPlugin({
92
+ root: process.cwd(),
93
+ verbose: true,
94
+ dry: false,
95
+ cleanOnceBeforeBuildPatterns: ["app.*"],
96
+ }),
97
+ ],
98
+ };
99
+ };