jodit-react 1.2.5 → 1.2.6
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/workspace.xml +4 -2
- package/examples/webpack.config.js +37 -0
- package/package.json +1 -1
- package/webpack.config.js +70 -0
package/.idea/workspace.xml
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<project version="4">
|
|
3
3
|
<component name="ChangeListManager">
|
|
4
|
-
<list default="true" id="c6024368-e635-45fa-a1ee-da52613355c9" name="Default" comment=""
|
|
4
|
+
<list default="true" id="c6024368-e635-45fa-a1ee-da52613355c9" name="Default" comment="">
|
|
5
|
+
<change beforePath="$PROJECT_DIR$/.npmignore" beforeDir="false" afterPath="$PROJECT_DIR$/.npmignore" afterDir="false" />
|
|
6
|
+
</list>
|
|
5
7
|
<option name="SHOW_DIALOG" value="false" />
|
|
6
8
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
7
9
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
|
@@ -117,7 +119,7 @@
|
|
|
117
119
|
<workItem from="1623793811563" duration="91000" />
|
|
118
120
|
<workItem from="1633389466820" duration="2581000" />
|
|
119
121
|
<workItem from="1637776693553" duration="775000" />
|
|
120
|
-
<workItem from="1645383610355" duration="
|
|
122
|
+
<workItem from="1645383610355" duration="6816000" />
|
|
121
123
|
</task>
|
|
122
124
|
<task id="LOCAL-00001" summary="Merge branch 'master' of https://github.com/jodit/jodit-react # Conflicts: #	package.json">
|
|
123
125
|
<created>1575919750934</created>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var path = require('path');
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
entry: './app.js',
|
|
5
|
+
devtool: 'eval',
|
|
6
|
+
module: {
|
|
7
|
+
rules: [
|
|
8
|
+
{
|
|
9
|
+
test: /\.js$/,
|
|
10
|
+
use: [
|
|
11
|
+
{
|
|
12
|
+
loader: 'babel-loader',
|
|
13
|
+
options: {
|
|
14
|
+
presets: [
|
|
15
|
+
'@babel/preset-env',
|
|
16
|
+
'@babel/preset-react'
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
test: /\.css$/,
|
|
24
|
+
use: ['style-loader', 'css-loader']
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
output: {
|
|
30
|
+
path: path.join(__dirname, '/build/'),
|
|
31
|
+
filename: 'app.js'
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
devServer: {
|
|
35
|
+
contentBase: './'
|
|
36
|
+
}
|
|
37
|
+
};
|
package/package.json
CHANGED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
const webpack = require('webpack');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
module.exports = (env, argv, dir = process.cwd()) => {
|
|
5
|
+
const debug = !argv || !argv.mode || !argv.mode.match(/production/);
|
|
6
|
+
|
|
7
|
+
return {
|
|
8
|
+
context: dir,
|
|
9
|
+
|
|
10
|
+
entry: './src/index.js',
|
|
11
|
+
devtool: debug ? 'inline-source-map' : false,
|
|
12
|
+
|
|
13
|
+
module: {
|
|
14
|
+
rules: [
|
|
15
|
+
{
|
|
16
|
+
test: /\.js$/,
|
|
17
|
+
use: {
|
|
18
|
+
loader: 'babel-loader',
|
|
19
|
+
options: require(path.join(dir, './babel.config.json'))
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
test: /\.css$/,
|
|
24
|
+
use: ['style-loader', 'css-loader']
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
resolve: {
|
|
30
|
+
alias: {
|
|
31
|
+
'jodit-react': path.join(__dirname, './src')
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
output: {
|
|
36
|
+
path: path.join(dir, './build/'),
|
|
37
|
+
filename: 'jodit-react.js',
|
|
38
|
+
library: 'JoditEditor',
|
|
39
|
+
libraryTarget: 'umd'
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
plugins: [
|
|
43
|
+
new webpack.DefinePlugin({
|
|
44
|
+
'process.env': {
|
|
45
|
+
NODE_ENV: JSON.stringify(
|
|
46
|
+
debug ? 'development' : 'production'
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
}),
|
|
50
|
+
new webpack.optimize.ModuleConcatenationPlugin()
|
|
51
|
+
],
|
|
52
|
+
|
|
53
|
+
externals: {
|
|
54
|
+
jodit: 'jodit',
|
|
55
|
+
Jodit: 'Jodit',
|
|
56
|
+
react: {
|
|
57
|
+
root: 'React',
|
|
58
|
+
commonjs2: 'react',
|
|
59
|
+
commonjs: 'react',
|
|
60
|
+
amd: 'react'
|
|
61
|
+
},
|
|
62
|
+
'react-dom': {
|
|
63
|
+
root: 'ReactDOM',
|
|
64
|
+
commonjs2: 'react-dom',
|
|
65
|
+
commonjs: 'react-dom',
|
|
66
|
+
amd: 'react-dom'
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
};
|