jodit 3.8.1 → 3.8.2
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/.idea/codeStyles/Project.xml +68 -0
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/dictionaries/v_chupurnov.xml +10 -0
- package/.idea/encodings.xml +4 -0
- package/.idea/inspectionProfiles/Project_Default.xml +118 -0
- package/.idea/jodit.iml +12 -0
- package/.idea/jsLibraryMappings.xml +6 -0
- package/.idea/markdown-navigator-enh.xml +29 -0
- package/.idea/markdown-navigator.xml +55 -0
- package/.idea/misc.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/prettier.xml +6 -0
- package/.idea/vcs.xml +6 -0
- package/.idea/watcherTasks.xml +4 -0
- package/.idea/workspace.xml +1264 -0
- package/build/jodit.css +2 -2
- package/build/jodit.es2018.css +1 -1
- package/build/jodit.es2018.en.css +1 -1
- package/build/jodit.es2018.en.js +4 -4
- package/build/jodit.es2018.en.min.js +2 -2
- package/build/jodit.es2018.js +4 -4
- package/build/jodit.es2018.min.js +2 -2
- package/build/jodit.js +4 -4
- package/build/jodit.min.css +1 -1
- package/build/jodit.min.js +2 -2
- package/package.json +2 -2
- package/.travis.yml +0 -7
- package/bower.json +0 -33
- package/build.js +0 -39
- package/docker/Dockerfile +0 -11
- package/docker/README.md +0 -45
- package/docker/build +0 -3
- package/docker/install +0 -7
- package/docker/start +0 -3
- package/docker/test +0 -3
- package/docker/uninstall +0 -3
- package/examples/arabic.lang.html +0 -76
- package/examples/assets/app.css +0 -175
- package/examples/assets/app.js +0 -57
- package/examples/assets/download.jpg +0 -0
- package/examples/assets/icon.png +0 -0
- package/examples/assets/logo.png +0 -0
- package/examples/assets/prism.css +0 -200
- package/examples/assets/prism.js +0 -1254
- package/examples/color-picker.html +0 -139
- package/examples/custom-icons.html +0 -173
- package/examples/custom-toolbar.html +0 -80
- package/examples/example.default.html +0 -75
- package/examples/fullsize.html +0 -75
- package/examples/index.html +0 -176
- package/examples/inline-mode.html +0 -116
- package/examples/oneinstance.html +0 -125
- package/icons.html +0 -50
- package/karma.conf.js +0 -157
- package/make.js +0 -10
- package/server.js +0 -101
- package/test/bootstrap.js +0 -1167
- package/test/test.html +0 -102
- package/test/test.index.html +0 -11
- package/test/tests/acceptance/clipboardTest.js +0 -1234
- package/test/tests/acceptance/commandsTest.js +0 -647
- package/test/tests/acceptance/creatorTest.js +0 -103
- package/test/tests/acceptance/deleteBackSpaceTest.js +0 -1289
- package/test/tests/acceptance/dialogTest.js +0 -188
- package/test/tests/acceptance/editorTest.js +0 -855
- package/test/tests/acceptance/enterTest.js +0 -1088
- package/test/tests/acceptance/eventsTest.js +0 -1246
- package/test/tests/acceptance/filebrowserTest.js +0 -1309
- package/test/tests/acceptance/i18nTest.js +0 -81
- package/test/tests/acceptance/iframeTest.js +0 -306
- package/test/tests/acceptance/imageTest.js +0 -1649
- package/test/tests/acceptance/inlineModeTest.js +0 -826
- package/test/tests/acceptance/interfaceTest.js +0 -119
- package/test/tests/acceptance/mobileTest.js +0 -229
- package/test/tests/acceptance/plugins/classSpan.js +0 -220
- package/test/tests/acceptance/plugins/cleanHtml.js +0 -351
- package/test/tests/acceptance/plugins/color.js +0 -188
- package/test/tests/acceptance/plugins/dragAndDropElement.js +0 -172
- package/test/tests/acceptance/plugins/focus.js +0 -115
- package/test/tests/acceptance/plugins/font.js +0 -316
- package/test/tests/acceptance/plugins/image.js +0 -79
- package/test/tests/acceptance/plugins/indent.js +0 -179
- package/test/tests/acceptance/plugins/inline-popup.js +0 -578
- package/test/tests/acceptance/plugins/insert.js +0 -17
- package/test/tests/acceptance/plugins/limit.js +0 -164
- package/test/tests/acceptance/plugins/link.js +0 -1640
- package/test/tests/acceptance/plugins/orderedList.js +0 -290
- package/test/tests/acceptance/plugins/placeholder.js +0 -138
- package/test/tests/acceptance/plugins/resizer.js +0 -329
- package/test/tests/acceptance/plugins/search.js +0 -623
- package/test/tests/acceptance/plugins/size.js +0 -344
- package/test/tests/acceptance/plugins/source.js +0 -218
- package/test/tests/acceptance/plugins/stat.js +0 -120
- package/test/tests/acceptance/plugins/tooltip.js +0 -97
- package/test/tests/acceptance/plugins/wrapTextNodes.js +0 -105
- package/test/tests/acceptance/pluginsTest.js +0 -2219
- package/test/tests/acceptance/selectionTest.js +0 -862
- package/test/tests/acceptance/statesTest.js +0 -310
- package/test/tests/acceptance/tableTest.js +0 -1988
- package/test/tests/acceptance/toolbarTest.js +0 -1747
- package/test/tests/acceptance/undoredoTest.js +0 -217
- package/test/tests/acceptance/uploaderTest.js +0 -187
- package/test/tests/artio.jpg +0 -0
- package/test/tests/units/helpersTest.js +0 -771
- package/test/tests/units/modules/dom.js +0 -282
- package/test/tests/units/objectObserverTest.js +0 -533
- package/test/tests/units/popupTest.js +0 -211
- package/test/tests/units/positionTest.js +0 -238
- package/test/tests/units/styleTest.js +0 -1361
- package/webpack.config.js +0 -308
package/webpack.config.js
DELETED
|
@@ -1,308 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
3
|
-
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
|
-
* Copyright (c) 2013-2021 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
|
-
*/
|
|
6
|
-
// eslint-disable-next-line strict
|
|
7
|
-
const path = require('path');
|
|
8
|
-
const fs = require('fs');
|
|
9
|
-
|
|
10
|
-
const webpack = require('webpack');
|
|
11
|
-
|
|
12
|
-
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
13
|
-
|
|
14
|
-
const MinimizeJSPlugin = require('terser-webpack-plugin');
|
|
15
|
-
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
|
|
16
|
-
const PostBuild = require('./src/utils/post-build');
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* @param {array} end
|
|
20
|
-
* @param {object} argv
|
|
21
|
-
* @param {string} dir
|
|
22
|
-
*/
|
|
23
|
-
module.exports = (env, argv, dir = __dirname, onlyTS = false) => {
|
|
24
|
-
const pkg = require(path.resolve(dir, './package.json'));
|
|
25
|
-
|
|
26
|
-
const banner = `/*!
|
|
27
|
-
* ${pkg.name} - ${pkg.description}
|
|
28
|
-
* Author: ${pkg.author}
|
|
29
|
-
* Version: v${pkg.version}
|
|
30
|
-
* Url: ${pkg.homepage}
|
|
31
|
-
* License(s): ${pkg.license}
|
|
32
|
-
*/
|
|
33
|
-
`;
|
|
34
|
-
|
|
35
|
-
const debug = !argv || !argv.mode || !argv.mode.match(/production/);
|
|
36
|
-
const isTest = Boolean(argv && argv.isTest);
|
|
37
|
-
|
|
38
|
-
const mode = debug ? 'development' : argv.mode;
|
|
39
|
-
const isProd = mode === 'production';
|
|
40
|
-
const uglify = !debug && argv && Boolean(argv.uglify);
|
|
41
|
-
const excludeLangs = Boolean(argv.excludeLangs) || false;
|
|
42
|
-
|
|
43
|
-
const ES = argv && ['es5', 'es2018'].includes(argv.es) ? argv.es : 'es2018';
|
|
44
|
-
const ESNext = ES === 'es2018';
|
|
45
|
-
|
|
46
|
-
console.warn(`ES:${ES} Mode:${mode} Test:${isTest}`);
|
|
47
|
-
|
|
48
|
-
const filename =
|
|
49
|
-
argv.filename ||
|
|
50
|
-
(name =>
|
|
51
|
-
name +
|
|
52
|
-
(ES === 'es5' || isTest ? '' : '.' + ES) +
|
|
53
|
-
(excludeLangs ? '.en' : '') +
|
|
54
|
-
(uglify ? '.min' : ''));
|
|
55
|
-
|
|
56
|
-
const css_loaders = [
|
|
57
|
-
debug || isTest ? 'style-loader' : MiniCssExtractPlugin.loader,
|
|
58
|
-
{
|
|
59
|
-
loader: 'css-loader',
|
|
60
|
-
options: {
|
|
61
|
-
sourceMap: debug,
|
|
62
|
-
importLoaders: 1
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
loader: path.resolve(
|
|
67
|
-
__dirname,
|
|
68
|
-
'./src/utils/css-variables-prefixes'
|
|
69
|
-
)
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
loader: 'less-loader',
|
|
73
|
-
options: {
|
|
74
|
-
sourceMap: debug
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
];
|
|
78
|
-
|
|
79
|
-
const plugins = [
|
|
80
|
-
new webpack.ProgressPlugin(),
|
|
81
|
-
new webpack.DefinePlugin({
|
|
82
|
-
appVersion: JSON.stringify(pkg.version),
|
|
83
|
-
isProd: isProd,
|
|
84
|
-
isESNext: ESNext,
|
|
85
|
-
isTest: isTest,
|
|
86
|
-
'process.env': {
|
|
87
|
-
HOMEPAGE: JSON.stringify(pkg.homepage),
|
|
88
|
-
TARGET_ES: JSON.stringify(ES),
|
|
89
|
-
NODE_ENV: JSON.stringify(mode),
|
|
90
|
-
EXCLUDE_LANGS: JSON.stringify(excludeLangs)
|
|
91
|
-
}
|
|
92
|
-
})
|
|
93
|
-
];
|
|
94
|
-
|
|
95
|
-
const config = {
|
|
96
|
-
cache: !isProd,
|
|
97
|
-
mode,
|
|
98
|
-
context: dir,
|
|
99
|
-
|
|
100
|
-
stats: {
|
|
101
|
-
colors: true
|
|
102
|
-
},
|
|
103
|
-
|
|
104
|
-
devtool: debug ? 'inline-source-map' : false,
|
|
105
|
-
|
|
106
|
-
entry: {
|
|
107
|
-
jodit: debug
|
|
108
|
-
? ['webpack-hot-middleware/client.js', './src/index']
|
|
109
|
-
: ['./src/index']
|
|
110
|
-
},
|
|
111
|
-
|
|
112
|
-
output: {
|
|
113
|
-
path: path.join(dir, 'build'),
|
|
114
|
-
filename: filename('[name]') + '.js',
|
|
115
|
-
publicPath: '/build/',
|
|
116
|
-
libraryTarget: 'umd'
|
|
117
|
-
},
|
|
118
|
-
|
|
119
|
-
resolve: {
|
|
120
|
-
extensions: ['.js', '.ts', '.d.ts', '.json', '.less', '.svg']
|
|
121
|
-
},
|
|
122
|
-
|
|
123
|
-
optimization: {
|
|
124
|
-
minimize: !debug && uglify,
|
|
125
|
-
moduleIds: debug ? 'named' : 'natural',
|
|
126
|
-
minimizer: [
|
|
127
|
-
new MinimizeJSPlugin({
|
|
128
|
-
parallel: true,
|
|
129
|
-
extractComments: false,
|
|
130
|
-
|
|
131
|
-
exclude: './src/langs',
|
|
132
|
-
terserOptions: {
|
|
133
|
-
ecma: ESNext ? 8 : 5,
|
|
134
|
-
|
|
135
|
-
mangle: {
|
|
136
|
-
reserved: ['Jodit']
|
|
137
|
-
},
|
|
138
|
-
|
|
139
|
-
compress: {
|
|
140
|
-
unsafe_arrows: ESNext,
|
|
141
|
-
unsafe_methods: ESNext,
|
|
142
|
-
unsafe: ESNext,
|
|
143
|
-
|
|
144
|
-
drop_console: !isTest,
|
|
145
|
-
drop_debugger: !isTest,
|
|
146
|
-
|
|
147
|
-
pure_getters: true,
|
|
148
|
-
unsafe_comps: true,
|
|
149
|
-
passes: 7
|
|
150
|
-
},
|
|
151
|
-
|
|
152
|
-
output: {
|
|
153
|
-
comments: false,
|
|
154
|
-
beautify: false,
|
|
155
|
-
preamble: banner
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
}),
|
|
159
|
-
new CssMinimizerPlugin({
|
|
160
|
-
parallel: true,
|
|
161
|
-
minimizerOptions: {
|
|
162
|
-
preset: [
|
|
163
|
-
'advanced',
|
|
164
|
-
{
|
|
165
|
-
discardComments: { removeAll: true },
|
|
166
|
-
zindex: false
|
|
167
|
-
}
|
|
168
|
-
]
|
|
169
|
-
}
|
|
170
|
-
})
|
|
171
|
-
]
|
|
172
|
-
},
|
|
173
|
-
|
|
174
|
-
module: {
|
|
175
|
-
rules: [
|
|
176
|
-
{
|
|
177
|
-
test: /\.less$/,
|
|
178
|
-
use: css_loaders
|
|
179
|
-
},
|
|
180
|
-
|
|
181
|
-
{
|
|
182
|
-
test: /\.(js|ts)$/,
|
|
183
|
-
loader: 'ts-loader',
|
|
184
|
-
options: {
|
|
185
|
-
transpileOnly: true,
|
|
186
|
-
allowTsInNodeModules: true
|
|
187
|
-
},
|
|
188
|
-
include: [path.resolve(__dirname, './node_modules')]
|
|
189
|
-
},
|
|
190
|
-
|
|
191
|
-
{
|
|
192
|
-
test: /\.(ts)$/,
|
|
193
|
-
use: [
|
|
194
|
-
{
|
|
195
|
-
loader: path.resolve(
|
|
196
|
-
__dirname,
|
|
197
|
-
'./src/utils/lang-loader.js'
|
|
198
|
-
)
|
|
199
|
-
}
|
|
200
|
-
],
|
|
201
|
-
include: path.resolve(__dirname, './src/langs'),
|
|
202
|
-
exclude: path.resolve(__dirname, './src/langs/index.ts')
|
|
203
|
-
},
|
|
204
|
-
|
|
205
|
-
{
|
|
206
|
-
test: /\.ts$/,
|
|
207
|
-
loader: 'ts-loader',
|
|
208
|
-
options: {
|
|
209
|
-
transpileOnly: uglify,
|
|
210
|
-
allowTsInNodeModules: true,
|
|
211
|
-
compilerOptions: {
|
|
212
|
-
target: ES
|
|
213
|
-
}
|
|
214
|
-
},
|
|
215
|
-
include: [path.resolve(__dirname, './src/')],
|
|
216
|
-
exclude: [
|
|
217
|
-
/langs\/[a-z]{2}\.ts/,
|
|
218
|
-
/langs\/[a-z]{2}_[a-z]{2}\.ts/
|
|
219
|
-
]
|
|
220
|
-
},
|
|
221
|
-
|
|
222
|
-
{
|
|
223
|
-
test: /\.svg$/i,
|
|
224
|
-
use: {
|
|
225
|
-
loader: path.resolve(
|
|
226
|
-
__dirname,
|
|
227
|
-
'src/utils/svg-loader.js'
|
|
228
|
-
)
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
]
|
|
232
|
-
},
|
|
233
|
-
|
|
234
|
-
plugins: debug
|
|
235
|
-
? [...plugins, new webpack.HotModuleReplacementPlugin()]
|
|
236
|
-
: plugins
|
|
237
|
-
};
|
|
238
|
-
|
|
239
|
-
if (!debug && !isTest) {
|
|
240
|
-
switch (mode) {
|
|
241
|
-
case 'production':
|
|
242
|
-
config.plugins.push(
|
|
243
|
-
new MiniCssExtractPlugin({
|
|
244
|
-
filename: filename('[name]') + '.css'
|
|
245
|
-
})
|
|
246
|
-
);
|
|
247
|
-
|
|
248
|
-
break;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
config.plugins.push(
|
|
252
|
-
new webpack.BannerPlugin({
|
|
253
|
-
banner,
|
|
254
|
-
raw: true,
|
|
255
|
-
entryOnly: true
|
|
256
|
-
})
|
|
257
|
-
);
|
|
258
|
-
|
|
259
|
-
if (isProd && !ESNext && !onlyTS) {
|
|
260
|
-
config.plugins.push(
|
|
261
|
-
new PostBuild(() => {
|
|
262
|
-
const postcss = require('postcss');
|
|
263
|
-
|
|
264
|
-
const plugins = postcss([
|
|
265
|
-
require('autoprefixer')({
|
|
266
|
-
overrideBrowserslist: [
|
|
267
|
-
'>1%',
|
|
268
|
-
'last 4 versions',
|
|
269
|
-
'Firefox ESR',
|
|
270
|
-
'ie >= 11'
|
|
271
|
-
]
|
|
272
|
-
}),
|
|
273
|
-
require('postcss-css-variables')
|
|
274
|
-
]);
|
|
275
|
-
|
|
276
|
-
const file = path.resolve(
|
|
277
|
-
config.output.path,
|
|
278
|
-
filename('jodit') + '.css'
|
|
279
|
-
);
|
|
280
|
-
|
|
281
|
-
fs.readFile(file, (err, css) => {
|
|
282
|
-
if (err) {
|
|
283
|
-
console.log(err);
|
|
284
|
-
return;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
plugins
|
|
288
|
-
.process(css, { from: file, to: file })
|
|
289
|
-
.then(result => {
|
|
290
|
-
fs.writeFile(
|
|
291
|
-
file,
|
|
292
|
-
banner + result.css,
|
|
293
|
-
() => true
|
|
294
|
-
);
|
|
295
|
-
});
|
|
296
|
-
});
|
|
297
|
-
})
|
|
298
|
-
);
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
Object.defineProperty(config, 'css_loaders', {
|
|
303
|
-
enumerable: false,
|
|
304
|
-
value: css_loaders
|
|
305
|
-
});
|
|
306
|
-
|
|
307
|
-
return config;
|
|
308
|
-
};
|