@wiris/mathtype-tinymce6 8.0.0 → 8.1.1
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/editor_plugin.src.js +10 -5
- package/package.json +3 -5
- package/plugin.min.js +1 -1
- package/project.json +18 -4
- package/webpack.config.js +73 -51
package/project.json
CHANGED
|
@@ -1,12 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"root": "packages/tinymce6",
|
|
3
|
+
"sourceRoot": "package/tinymce6/src",
|
|
3
4
|
"targets": {
|
|
4
5
|
"build": {
|
|
5
|
-
"executor": "
|
|
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",
|
|
6
20
|
"options": {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
21
|
+
"buildTarget": "tinymce6:build",
|
|
22
|
+
"webpackConfig": "packages/tinymce6/webpack.config.js"
|
|
23
|
+
}
|
|
10
24
|
},
|
|
11
25
|
"test": {
|
|
12
26
|
"executor": "@nrwl/cypress:cypress",
|
package/webpack.config.js
CHANGED
|
@@ -1,71 +1,93 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const webpack = require('webpack');
|
|
3
3
|
const TerserPlugin = require("terser-webpack-plugin");
|
|
4
|
+
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
|
4
5
|
|
|
5
|
-
module.exports = {
|
|
6
|
+
module.exports = (config, context) => {
|
|
7
|
+
return {
|
|
6
8
|
entry: {
|
|
7
|
-
|
|
9
|
+
app: path.resolve(__dirname, './global.js'),
|
|
8
10
|
},
|
|
9
11
|
output: {
|
|
10
|
-
|
|
11
|
-
|
|
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 && config.devServer) ? config.devServer.onListening : '',
|
|
23
|
+
hot: true,
|
|
24
|
+
port: 9007,
|
|
25
|
+
host: '0.0.0.0'
|
|
12
26
|
},
|
|
13
27
|
// Set watch to true for dev purposes.
|
|
14
28
|
watch: false,
|
|
15
29
|
optimization: {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
+
})],
|
|
26
40
|
},
|
|
41
|
+
mode: 'none',
|
|
27
42
|
module: {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
|
38
66
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
loader: 'url-loader',
|
|
49
|
-
options: {
|
|
50
|
-
limit: 8192
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
]
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
// For the modal close, minimize, maximize icons
|
|
57
|
-
test: /\.svg$/,
|
|
58
|
-
use: [ 'raw-loader' ]
|
|
59
|
-
},
|
|
60
|
-
]
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
// For the modal close, minimize, maximize icons
|
|
72
|
+
test: /\.svg$/,
|
|
73
|
+
use: [ 'raw-loader' ]
|
|
74
|
+
},
|
|
75
|
+
]
|
|
61
76
|
},
|
|
62
77
|
stats: {
|
|
63
|
-
|
|
78
|
+
colors: true
|
|
64
79
|
},
|
|
65
80
|
plugins: [
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
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
|
+
}),
|
|
70
91
|
],
|
|
92
|
+
}
|
|
71
93
|
};
|