@standardnotes/bold-editor 1.6.3
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/.babelrc +11 -0
- package/.eslintignore +3 -0
- package/.eslintrc +29 -0
- package/CHANGELOG.md +82 -0
- package/LICENSE +661 -0
- package/README.md +98 -0
- package/app/App.js +18 -0
- package/app/components/Editor.js +415 -0
- package/app/main.js +8 -0
- package/app/stylesheets/main.scss +272 -0
- package/dist/dist.css +1 -0
- package/dist/dist.min.js +2 -0
- package/dist/dist.min.js.LICENSE.txt +42 -0
- package/dist/filesafe-js/EncryptionWorker.js +2 -0
- package/dist/filesafe-js/EncryptionWorker.js.LICENSE.txt +5 -0
- package/dist/index.html +1 -0
- package/dist/vendor.css +6 -0
- package/dist/vendor.js +1 -0
- package/editor.index.ejs +14 -0
- package/editor_bar.png +0 -0
- package/ext.json.sample +9 -0
- package/package.json +54 -0
- package/redactor/plugins/alignment/alignment.js +55 -0
- package/redactor/plugins/alignment/alignment.min.js +1 -0
- package/redactor/plugins/counter/counter.js +76 -0
- package/redactor/plugins/counter/counter.min.js +1 -0
- package/redactor/plugins/filesafe/filesafe.js +70 -0
- package/redactor/plugins/filesafe/filesafe.min.js +70 -0
- package/redactor/plugins/fontcolor/fontcolor.js +184 -0
- package/redactor/plugins/fontcolor/fontcolor.min.js +1 -0
- package/redactor/plugins/fontfamily/fontfamily.js +59 -0
- package/redactor/plugins/fontfamily/fontfamily.min.js +1 -0
- package/redactor/plugins/fontsize/fontsize.js +58 -0
- package/redactor/plugins/fontsize/fontsize.min.js +1 -0
- package/redactor/plugins/imagemanager/imagemanager.js +82 -0
- package/redactor/plugins/imagemanager/imagemanager.min.js +1 -0
- package/redactor/plugins/inlinestyle/inlinestyle.css +34 -0
- package/redactor/plugins/inlinestyle/inlinestyle.js +62 -0
- package/redactor/plugins/inlinestyle/inlinestyle.min.css +1 -0
- package/redactor/plugins/inlinestyle/inlinestyle.min.js +1 -0
- package/redactor/plugins/specialchars/specialchars.js +78 -0
- package/redactor/plugins/specialchars/specialchars.min.js +1 -0
- package/redactor/plugins/table/table.js +477 -0
- package/redactor/plugins/table/table.min.js +1 -0
- package/redactor/plugins/textdirection/textdirection.js +44 -0
- package/redactor/plugins/textdirection/textdirection.min.js +1 -0
- package/redactor/plugins/textexpander/textexpander.js +64 -0
- package/redactor/plugins/textexpander/textexpander.min.js +1 -0
- package/redactor/plugins/variable/variable.css +23 -0
- package/redactor/plugins/variable/variable.js +222 -0
- package/redactor/plugins/variable/variable.min.css +1 -0
- package/redactor/plugins/variable/variable.min.js +1 -0
- package/redactor/src/redactor.min.css +1 -0
- package/redactor/src/redactor.min.js +1 -0
- package/webpack.config.js +82 -0
- package/webpack.dev.js +20 -0
- package/webpack.prod.js +11 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
|
3
|
+
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
4
|
+
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
5
|
+
const MergeIntoSingleFilePlugin = require('webpack-merge-and-include-globally');
|
|
6
|
+
|
|
7
|
+
module.exports = {
|
|
8
|
+
context: __dirname,
|
|
9
|
+
entry: [
|
|
10
|
+
path.resolve(__dirname, 'app/main.js'),
|
|
11
|
+
path.resolve(__dirname, 'app/stylesheets/main.scss'),
|
|
12
|
+
],
|
|
13
|
+
output: {
|
|
14
|
+
path: path.resolve(__dirname, 'dist'),
|
|
15
|
+
filename: 'dist.min.js'
|
|
16
|
+
},
|
|
17
|
+
module: {
|
|
18
|
+
rules: [
|
|
19
|
+
{
|
|
20
|
+
test: /\.s[ac]ss$/i,
|
|
21
|
+
exclude: /node_modules/,
|
|
22
|
+
use: [
|
|
23
|
+
MiniCssExtractPlugin.loader,
|
|
24
|
+
"css-loader",
|
|
25
|
+
{
|
|
26
|
+
loader: "sass-loader",
|
|
27
|
+
options: {
|
|
28
|
+
sassOptions: {
|
|
29
|
+
includePaths: [
|
|
30
|
+
path.resolve(__dirname, 'app/stylesheets/main.scss')
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
test: /\.js[x]?$/,
|
|
39
|
+
include: [
|
|
40
|
+
path.resolve(__dirname, 'app'),
|
|
41
|
+
],
|
|
42
|
+
exclude: /node_modules/,
|
|
43
|
+
use: ['babel-loader']
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
resolve: {
|
|
48
|
+
extensions: ['.js', '.jsx'],
|
|
49
|
+
alias: {
|
|
50
|
+
stylekit: require.resolve('sn-stylekit/dist/stylekit.css'),
|
|
51
|
+
'@Components': path.resolve(__dirname, 'app/components'),
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
plugins: [
|
|
55
|
+
new MiniCssExtractPlugin({
|
|
56
|
+
filename: "dist.css"
|
|
57
|
+
}),
|
|
58
|
+
new HtmlWebpackPlugin({
|
|
59
|
+
title: "Bold Editor",
|
|
60
|
+
template: 'editor.index.ejs',
|
|
61
|
+
filename: 'index.html'
|
|
62
|
+
}),
|
|
63
|
+
new CopyWebpackPlugin({
|
|
64
|
+
patterns: [
|
|
65
|
+
{ from: require.resolve('@standardnotes/editor-kit/dist/filesafe-js/EncryptionWorker.js'), to: 'filesafe-js/EncryptionWorker.js' },
|
|
66
|
+
],
|
|
67
|
+
}),
|
|
68
|
+
new MergeIntoSingleFilePlugin({
|
|
69
|
+
files: {
|
|
70
|
+
"vendor.js": [
|
|
71
|
+
'redactor/src/redactor.min.js',
|
|
72
|
+
'redactor/plugins/**/*.min.js',
|
|
73
|
+
],
|
|
74
|
+
"vendor.css": [
|
|
75
|
+
require.resolve('filesafe-embed/dist/dist.css'),
|
|
76
|
+
'redactor/src/redactor.min.css',
|
|
77
|
+
'redactor/plugins/inlinestyle/inlinestyle.min.css'
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
}),
|
|
81
|
+
]
|
|
82
|
+
};
|
package/webpack.dev.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const { merge } = require('webpack-merge');
|
|
3
|
+
const config = require('./webpack.config.js');
|
|
4
|
+
|
|
5
|
+
module.exports = merge(config, {
|
|
6
|
+
mode: 'development',
|
|
7
|
+
devtool: 'cheap-source-map',
|
|
8
|
+
devServer: {
|
|
9
|
+
port: 8001,
|
|
10
|
+
contentBase: path.resolve(__dirname, 'dist'),
|
|
11
|
+
disableHostCheck: true,
|
|
12
|
+
historyApiFallback: true,
|
|
13
|
+
watchOptions: { aggregateTimeout: 300, poll: 1000 },
|
|
14
|
+
headers: {
|
|
15
|
+
'Access-Control-Allow-Origin': '*',
|
|
16
|
+
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
|
|
17
|
+
'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization'
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
});
|
package/webpack.prod.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const { merge } = require('webpack-merge');
|
|
2
|
+
const config = require('./webpack.config.js');
|
|
3
|
+
const TerserPlugin = require("terser-webpack-plugin");
|
|
4
|
+
|
|
5
|
+
module.exports = merge(config, {
|
|
6
|
+
mode: 'production',
|
|
7
|
+
optimization: {
|
|
8
|
+
minimize: true,
|
|
9
|
+
minimizer: [new TerserPlugin()]
|
|
10
|
+
}
|
|
11
|
+
});
|