@wiris/mathtype-tinymce6 7.31.0 → 8.1.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,42 @@
1
+ {
2
+ "root": "packages/tinymce6",
3
+ "sourceRoot": "package/tinymce6/src",
4
+ "targets": {
5
+ "build": {
6
+ "executor": "@nrwl/web:webpack",
7
+ "dependsOn": [],
8
+ "outputs": ["{options.outputPath}"],
9
+ "options": {
10
+ "main": "demos/packages/tinymce6/global.js",
11
+ "outputPath": "dist",
12
+ "tsConfig": "tsconfig.app.json",
13
+ "generateIndexHtml": false,
14
+ "index": " ",
15
+ "webpackConfig": "packages/tinymce6/webpack.config.js"
16
+ }
17
+ },
18
+ "start": {
19
+ "executor": "@nrwl/web:dev-server",
20
+ "options": {
21
+ "buildTarget": "tinymce6:build",
22
+ "webpackConfig": "packages/tinymce6/webpack.config.js"
23
+ }
24
+ },
25
+ "test": {
26
+ "executor": "@nrwl/cypress:cypress",
27
+ "dependsOn": ["build"],
28
+ "options": {
29
+ "baseUrl": "http://localhost:8008",
30
+ "cypressConfig": "./cypress.json"
31
+ }
32
+ },
33
+ "lint": {
34
+ "executor": "@nrwl/linter:eslint",
35
+ "options": {
36
+ "eslintConfig": "./.eslintrc.js",
37
+ "lintFilePatterns": ["packages/tinymce6/**/*.{ts,tsx,js,jsx}"]
38
+ },
39
+ "outputs": ["{options.outputFile}"]
40
+ }
41
+ }
42
+ }
package/webpack.config.js CHANGED
@@ -1,64 +1,93 @@
1
1
  const path = require('path');
2
+ const webpack = require('webpack');
2
3
  const TerserPlugin = require("terser-webpack-plugin");
4
+ const { CleanWebpackPlugin } = require('clean-webpack-plugin');
3
5
 
4
- module.exports = {
6
+ module.exports = (config, context) => {
7
+ return {
5
8
  entry: {
6
- app: './global.js'
9
+ app: path.resolve(__dirname, './global.js'),
7
10
  },
8
11
  output: {
9
- path: path.resolve(__dirname, ''),
10
- filename: './plugin.min.js'
12
+ path: path.resolve(__dirname, ''),
13
+ filename: './plugin.min.js'
14
+ },
15
+ devServer: {
16
+ devMiddleware: {
17
+ writeToDisk: true,
18
+ },
19
+ static: {
20
+ directory: path.join(__dirname, "./")
21
+ },
22
+ onListening: !config.devServer ? '' : config.devServer.onListening,
23
+ hot: true,
24
+ port: 9007,
25
+ host: '0.0.0.0'
11
26
  },
12
27
  // Set watch to true for dev purposes.
13
28
  watch: false,
14
29
  optimization: {
15
- minimize: true,
16
- minimizer: [new TerserPlugin({
17
- // These options prevent Terser from generating a LICENSE.txt file
18
- terserOptions: {
19
- format: {
20
- comments: false,
21
- },
22
- },
23
- extractComments: false,
24
- })],
30
+ minimize: true,
31
+ minimizer: [new TerserPlugin({
32
+ // These options prevent Terser from generating a LICENSE.txt file
33
+ terserOptions: {
34
+ format: {
35
+ comments: false,
36
+ },
37
+ },
38
+ extractComments: false,
39
+ })],
25
40
  },
41
+ mode: 'none',
26
42
  module: {
27
- rules: [
28
- {
29
- // Rule to translate ES5 javascript files to ES6.
30
- test: /\.js$/,
31
- exclude: /node_modules\/(?!(@wiris\/mathtype-html-integration-devkit)\/).*/,
32
- use: {
33
- loader: 'babel-loader',
34
- options: {
35
- presets: ['@babel/env']
36
- }
43
+ rules: [
44
+ {
45
+ // Rule to translate ES5 javascript files to ES6.
46
+ test: /\.js$/,
47
+ exclude: /node_modules\/(?!(@wiris\/mathtype-html-integration-devkit)\/).*/,
48
+ use: {
49
+ loader: 'babel-loader',
50
+ options: {
51
+ presets: ['@babel/env']
52
+ }
53
+ }
54
+ },
55
+ {
56
+ test: /\.css$/,
57
+ use: ['style-loader', 'css-loader']
58
+ },
59
+ {
60
+ test: /\.(png|jpg|gif)$/i,
61
+ use: [
62
+ {
63
+ loader: 'url-loader',
64
+ options: {
65
+ limit: 8192
37
66
  }
38
- },
39
- {
40
- test: /\.css$/,
41
- use: ['style-loader', 'css-loader']
42
- },
43
- {
44
- test: /\.(png|jpg|gif)$/i,
45
- use: [
46
- {
47
- loader: 'url-loader',
48
- options: {
49
- limit: 8192
50
- }
51
- }
52
- ]
53
- },
54
- {
55
- // For the modal close, minimize, maximize icons
56
- test: /\.svg$/,
57
- use: [ 'raw-loader' ]
58
- },
59
- ]
67
+ }
68
+ ]
69
+ },
70
+ {
71
+ // For the modal close, minimize, maximize icons
72
+ test: /\.svg$/,
73
+ use: [ 'raw-loader' ]
74
+ },
75
+ ]
60
76
  },
61
77
  stats: {
62
- colors: true
63
- }
64
- };
78
+ colors: true
79
+ },
80
+ plugins: [
81
+ new webpack.EnvironmentPlugin({
82
+ 'SERVICE_PROVIDER_URI': 'https://www.wiris.net/demo/plugins/app',
83
+ 'SERVICE_PROVIDER_SERVER': 'java',
84
+ }),
85
+ new CleanWebpackPlugin({
86
+ root: process.cwd(),
87
+ verbose: true,
88
+ dry: false,
89
+ cleanOnceBeforeBuildPatterns: ["app.*"]
90
+ }),
91
+ ],
92
+ }
93
+ };
package/package.json.temp DELETED
@@ -1,51 +0,0 @@
1
- {
2
- "name": "@wiris/mathtype-tinymce6",
3
- "version": "7.27.1",
4
- "description": "MathType Web for TinyMCE6 editor",
5
- "keywords": [
6
- "chem",
7
- "chemistry",
8
- "chemtype",
9
- "editor",
10
- "equation",
11
- "latex",
12
- "math",
13
- "mathml",
14
- "maths",
15
- "mathtype",
16
- "tinymce",
17
- "tinymce5",
18
- "wiris"
19
- ],
20
- "repository": "https://github.com/wiris/html-integrations/tree/stable/packages/mathtype-tinymce6",
21
- "homepage": "https://www.wiris.com/",
22
- "bugs": {
23
- "email": "support@wiris.com"
24
- },
25
- "license": "MIT",
26
- "author": "WIRIS Team (http://www.wiris.com)",
27
- "main": "plugin.min.js",
28
- "scripts": {
29
- "build": "webpack --mode production",
30
- "build-dev": "webpack --mode development",
31
- "clean": "shx rm -f plugin.min.js",
32
- "compile": "node ../../scripts/services/compile editor_plugin.src.js .",
33
- "prepack": "npm install && npm run compile -- npm"
34
- },
35
- "dependencies": {
36
- "@wiris/mathtype-html-integration-devkit": "1.6.1"
37
- },
38
- "devDependencies": {
39
- "@babel/core": "^7.15.0",
40
- "@babel/preset-env": "^7.15.0",
41
- "babel-loader": "^8.2.2",
42
- "css-loader": "^5.2.4",
43
- "raw-loader": "^4.0.2",
44
- "shx": "^0.3.3",
45
- "style-loader": "^3.3.0",
46
- "terser-webpack-plugin": "^5.3.0",
47
- "url-loader": "^4.1.1",
48
- "webpack": "^5.50.0",
49
- "webpack-cli": "^4.8.0"
50
- }
51
- }