@standardnotes/simple-task-editor 1.3.10
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 +15 -0
- package/.eslintignore +3 -0
- package/.eslintrc +26 -0
- package/LICENSE +661 -0
- package/README.md +19 -0
- package/app/components/CreateTask.js +74 -0
- package/app/components/TaskRow.js +111 -0
- package/app/components/Tasks.js +197 -0
- package/app/lib/tasksManager.js +249 -0
- package/app/main.js +22 -0
- package/app/models/Task.js +58 -0
- package/app/stylesheets/main.scss +181 -0
- package/dist/dist.css +5 -0
- package/dist/dist.js +2 -0
- package/dist/dist.js.LICENSE.txt +39 -0
- package/dist/index.html +1 -0
- package/editor.index.ejs +11 -0
- package/ext.json.sample +8 -0
- package/package.json +52 -0
- package/webpack.config.js +58 -0
- package/webpack.dev.js +20 -0
- package/webpack.prod.js +11 -0
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@standardnotes/simple-task-editor",
|
|
3
|
+
"version": "1.3.10",
|
|
4
|
+
"main": "dist/dist.js",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
7
|
+
"build": "webpack --config webpack.prod.js",
|
|
8
|
+
"start": "webpack serve --config webpack.dev.js --progress --hot",
|
|
9
|
+
"lint": "eslint app/ --ext .js",
|
|
10
|
+
"lint:fix": "yarn lint --fix",
|
|
11
|
+
"prepublishOnly": "npm run build"
|
|
12
|
+
},
|
|
13
|
+
"sn": {
|
|
14
|
+
"main": "dist/index.html"
|
|
15
|
+
},
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"@babel/core": "^7.13.10",
|
|
18
|
+
"@babel/eslint-parser": "^7.13.10",
|
|
19
|
+
"@babel/plugin-proposal-class-properties": "^7.13.0",
|
|
20
|
+
"@babel/plugin-transform-runtime": "^7.13.0",
|
|
21
|
+
"@babel/preset-env": "^7.13.10",
|
|
22
|
+
"@babel/preset-react": "^7.12.13",
|
|
23
|
+
"@standardnotes/component-relay": "2.2.0",
|
|
24
|
+
"@standardnotes/eslint-config-extensions": "^1.0.2",
|
|
25
|
+
"babel-loader": "^8.2.2",
|
|
26
|
+
"css-loader": "^5.1.3",
|
|
27
|
+
"eslint": "^7.22.0",
|
|
28
|
+
"eslint-plugin-react": "^7.23.1",
|
|
29
|
+
"html-webpack-plugin": "^5.3.1",
|
|
30
|
+
"husky": "^5.2.0",
|
|
31
|
+
"mini-css-extract-plugin": "^1.3.9",
|
|
32
|
+
"node-sass": "^5.0.0",
|
|
33
|
+
"prop-types": "^15.7.2",
|
|
34
|
+
"react": "^17.0.1",
|
|
35
|
+
"react-dom": "^17.0.1",
|
|
36
|
+
"regenerator-runtime": "^0.13.7",
|
|
37
|
+
"sass-loader": "^11.0.1",
|
|
38
|
+
"sn-stylekit": "2.0.19",
|
|
39
|
+
"sortablejs": "^1.10.1",
|
|
40
|
+
"style-loader": "^1.0.1",
|
|
41
|
+
"terser-webpack-plugin": "^5.1.1",
|
|
42
|
+
"validate-commit-msg": "2.x",
|
|
43
|
+
"webpack": "5.24.4",
|
|
44
|
+
"webpack-cli": "4.5.0",
|
|
45
|
+
"webpack-dev-server": "3.11.2",
|
|
46
|
+
"webpack-merge": "5.7.3"
|
|
47
|
+
},
|
|
48
|
+
"publishConfig": {
|
|
49
|
+
"access": "public",
|
|
50
|
+
"registry": "https://registry.npmjs.org/"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
3
|
+
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
4
|
+
|
|
5
|
+
module.exports = {
|
|
6
|
+
context: __dirname,
|
|
7
|
+
entry: [
|
|
8
|
+
path.resolve(__dirname, 'app/main.js'),
|
|
9
|
+
path.resolve(__dirname, 'app/stylesheets/main.scss')
|
|
10
|
+
],
|
|
11
|
+
output: {
|
|
12
|
+
path: path.resolve(__dirname, 'dist'),
|
|
13
|
+
filename: 'dist.js'
|
|
14
|
+
},
|
|
15
|
+
module: {
|
|
16
|
+
rules: [
|
|
17
|
+
{
|
|
18
|
+
test: /\.s[ac]ss$/i,
|
|
19
|
+
exclude: /node_modules/,
|
|
20
|
+
use: [
|
|
21
|
+
MiniCssExtractPlugin.loader,
|
|
22
|
+
"css-loader",
|
|
23
|
+
{
|
|
24
|
+
loader: "sass-loader"
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
test: /\.js[x]?$/,
|
|
30
|
+
include: [
|
|
31
|
+
path.resolve(__dirname, 'app'),
|
|
32
|
+
path.resolve(__dirname, 'node_modules/@standardnotes/component-relay/dist/dist.js')
|
|
33
|
+
],
|
|
34
|
+
exclude: /node_modules/,
|
|
35
|
+
use: ['babel-loader']
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
resolve: {
|
|
40
|
+
extensions: ['.js', '.jsx'],
|
|
41
|
+
alias: {
|
|
42
|
+
stylekit: path.resolve(__dirname, 'node_modules/sn-stylekit/dist/stylekit.css'),
|
|
43
|
+
'@Components': path.resolve(__dirname, 'app/components'),
|
|
44
|
+
'@Lib': path.resolve(__dirname, 'app/lib'),
|
|
45
|
+
'@Models': path.resolve(__dirname, 'app/models')
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
plugins: [
|
|
49
|
+
new MiniCssExtractPlugin({
|
|
50
|
+
filename: "dist.css"
|
|
51
|
+
}),
|
|
52
|
+
new HtmlWebpackPlugin({
|
|
53
|
+
title: "Simple Task Editor",
|
|
54
|
+
template: 'editor.index.ejs',
|
|
55
|
+
filename: 'index.html'
|
|
56
|
+
})
|
|
57
|
+
]
|
|
58
|
+
};
|
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
|
+
});
|