layerpro 0.0.56 → 0.0.60
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/.editorconfig +13 -0
- package/.env +3 -0
- package/.eslintignore +12 -0
- package/.eslintrc.json +110 -0
- package/.gitattributes +2 -0
- package/.jsbeautifyrc +26 -0
- package/.prettierignore +2 -0
- package/.prettierrc +7 -0
- package/.vscode/launch.json +22 -0
- package/.vscode/settings.json +84 -0
- package/.vscodeignore +28 -0
- package/__mocks__/fileMock.js +3 -0
- package/__mocks__/styleMock.js +3 -0
- package/babel.config.js +34 -0
- package/backup.bat +43 -0
- package/coverage/clover.xml +6 -0
- package/coverage/coverage-final.json +1 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +101 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +196 -0
- package/coverage/lcov.info +0 -0
- package/{LICENSE.txt → dist/LICENSE.txt} +0 -0
- package/{README.md → dist/README.md} +0 -0
- package/documents/LICENSE.txt +21 -0
- package/documents/README.md +7 -0
- package/{SECURITY.md → documents/SECURITY.md} +0 -0
- package/index.js +7 -2
- package/init.js +35 -0
- package/jest.config.js +61 -0
- package/jsconfig.json +10 -0
- package/node/createTag.js +7 -0
- package/node/gitDeploy.js +7 -0
- package/node/goLive.js +7 -0
- package/package.json +40 -28
- package/scripts/GenLayer.jsx +234 -0
- package/scripts/message.jsx +280 -0
- package/scripts/mouseCoords.jsx +45 -0
- package/scripts/popup.jsx +604 -0
- package/scripts/purge.jsx +29 -0
- package/scripts/smoothScroll.js +69 -0
- package/scripts/window.js +28 -0
- package/styles/dock.scss +100 -0
- package/styles/general.scss +241 -0
- package/styles/icons.scss +33 -0
- package/styles/input.scss +35 -0
- package/styles/messages.scss +76 -0
- package/styles/resize.scss +99 -0
- package/styles/root.scss +14 -0
- package/styles/scrollbar.scss +24 -0
- package/tests/setupJest.tsx +4 -0
- package/tsconfig.json +69 -0
- package/typings/image.d.ts +9 -0
- package/typings/index.d.ts +7 -0
- package/typings/layerpro.d.ts +22 -0
- package/typings/styles.d.ts +27 -0
- package/typings/vscode.d.ts +14724 -0
- package/webpack.config.js +239 -0
- package/index.js.LICENSE.txt +0 -29
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright: © 2022 Dario Passariello <dariopassariello@gmail.com>
|
|
3
|
+
License: CC BY-NC-ND 4.0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
const path = require("node:path")
|
|
7
|
+
const webpack = require("webpack")
|
|
8
|
+
const dotenv = require('dotenv').config({ path: __dirname + '/.env' })
|
|
9
|
+
const TerserPlugin = require("terser-webpack-plugin")
|
|
10
|
+
const CopyPlugin = require("copy-webpack-plugin")
|
|
11
|
+
|
|
12
|
+
let pjson = require('./package.json')
|
|
13
|
+
|
|
14
|
+
module.exports = (environment, argv) => {
|
|
15
|
+
|
|
16
|
+
console.log(
|
|
17
|
+
{
|
|
18
|
+
version: pjson.version,
|
|
19
|
+
codeName: pjson.appCode,
|
|
20
|
+
relaseCodeName: pjson.appCodeRelease,
|
|
21
|
+
relaseType: pjson.appType,
|
|
22
|
+
appName: pjson.appName,
|
|
23
|
+
root: pjson.appFolder,
|
|
24
|
+
folderAPI: pjson.appAPI,
|
|
25
|
+
mode: argv.mode === 'development' ? 'development' : 'production',
|
|
26
|
+
}
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
console.debug("\n\tYour API came from: " + JSON.stringify(pjson.apiDev) + "\n\n")
|
|
30
|
+
|
|
31
|
+
return {
|
|
32
|
+
|
|
33
|
+
mode: argv.mode === 'development' ? 'development' : 'production',
|
|
34
|
+
devtool: argv.mode === 'development' ? 'eval-source-map' : 'cheap-module-source-map',
|
|
35
|
+
stats: argv.mode === 'development' ? 'errors-warnings' : '',
|
|
36
|
+
cache: argv.mode === 'development' ? false : true,
|
|
37
|
+
target: 'web',
|
|
38
|
+
|
|
39
|
+
devServer: {
|
|
40
|
+
|
|
41
|
+
static: {
|
|
42
|
+
directory: path.join(__dirname, 'dist'),
|
|
43
|
+
publicPath: '/',
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
port: pjson.appPort,
|
|
47
|
+
compress: argv.mode === 'development' ? false : true,
|
|
48
|
+
magicHtml: argv.mode === 'development' ? true : false,
|
|
49
|
+
liveReload: argv.mode === 'development' ? true : false,
|
|
50
|
+
hot: argv.mode === 'development' ? true : false,
|
|
51
|
+
historyApiFallback: true,
|
|
52
|
+
open: false,
|
|
53
|
+
|
|
54
|
+
headers: {
|
|
55
|
+
'Access-Control-Allow-Origin': '*',
|
|
56
|
+
'Access-Control-Allow-Credentials': true,
|
|
57
|
+
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
|
|
58
|
+
'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization',
|
|
59
|
+
'Accept-Encoding': '*',
|
|
60
|
+
'Crossorigin': 'anonymous',
|
|
61
|
+
'Author': 'Dario Passariello',
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
webSocketServer: 'ws',
|
|
65
|
+
client: {
|
|
66
|
+
overlay: argv.mode === 'development' ? true : false,
|
|
67
|
+
webSocketTransport: 'ws',
|
|
68
|
+
//progress: true,
|
|
69
|
+
//logging: 'info',
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
entry: {
|
|
75
|
+
index: ['./index.js']
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
output: {
|
|
79
|
+
filename: '[name].js?t=' + Date.now(),
|
|
80
|
+
path: path.resolve(__dirname, 'dist'),
|
|
81
|
+
clean: true,
|
|
82
|
+
publicPath: '/'
|
|
83
|
+
},
|
|
84
|
+
|
|
85
|
+
performance: {
|
|
86
|
+
hints: argv.mode === 'development' ? 'error' : false,
|
|
87
|
+
maxEntrypointSize: 51_200_000,
|
|
88
|
+
maxAssetSize: 51_200_000
|
|
89
|
+
},
|
|
90
|
+
|
|
91
|
+
optimization: {
|
|
92
|
+
minimize: argv.mode === 'development' ? false : true,
|
|
93
|
+
minimizer: [new TerserPlugin({
|
|
94
|
+
exclude: /static/,
|
|
95
|
+
})]
|
|
96
|
+
},
|
|
97
|
+
|
|
98
|
+
resolve: {
|
|
99
|
+
|
|
100
|
+
fallback: {
|
|
101
|
+
"fs": false
|
|
102
|
+
},
|
|
103
|
+
|
|
104
|
+
alias: {
|
|
105
|
+
Assets: path.resolve(__dirname, 'public/assets'),
|
|
106
|
+
Components: path.resolve(__dirname, 'src/components'),
|
|
107
|
+
Shared: path.resolve(__dirname, 'src/shared'),
|
|
108
|
+
App: path.resolve(__dirname, 'src/app'),
|
|
109
|
+
Config: path.resolve(__dirname, 'src/config'),
|
|
110
|
+
Data: path.resolve(__dirname, 'src/data'),
|
|
111
|
+
Pages: path.resolve(__dirname, 'src/pages'),
|
|
112
|
+
Scripts: path.resolve(__dirname, 'src/scripts'),
|
|
113
|
+
Styles: path.resolve(__dirname, 'src/styles'),
|
|
114
|
+
Typings: path.resolve(__dirname, 'src/typings'),
|
|
115
|
+
Utils: path.resolve(__dirname, 'src/utils'),
|
|
116
|
+
Validators: path.resolve(__dirname, 'src/validators'),
|
|
117
|
+
Layout: path.resolve(__dirname, 'src/layout'),
|
|
118
|
+
Root: path.resolve(__dirname, 'src/')
|
|
119
|
+
},
|
|
120
|
+
|
|
121
|
+
modules: [path.resolve('node_modules')],
|
|
122
|
+
extensions: [".ts", ".tsx", ".js", ".jsx", ".less", ".css", ".sass", ".scss"],
|
|
123
|
+
|
|
124
|
+
},
|
|
125
|
+
|
|
126
|
+
module: {
|
|
127
|
+
|
|
128
|
+
rules: [
|
|
129
|
+
// we use babel-loader to load our jsx and tsx files
|
|
130
|
+
{
|
|
131
|
+
test: /\.(ts|tsx|js|jsx)$/,
|
|
132
|
+
loader: require.resolve('babel-loader'),
|
|
133
|
+
exclude: [/node_modules/, /.OLD/],
|
|
134
|
+
options: {
|
|
135
|
+
//plugins: ['react-hot-loader/babel'],
|
|
136
|
+
cacheDirectory: argv.mode === 'development' ? true : false,
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
|
|
140
|
+
// plain file loader
|
|
141
|
+
{
|
|
142
|
+
test: /\.(txt)$/i, //
|
|
143
|
+
loader: 'file-loader',
|
|
144
|
+
exclude: [/.OLD/]
|
|
145
|
+
},
|
|
146
|
+
|
|
147
|
+
// CSS, SCSS
|
|
148
|
+
{
|
|
149
|
+
test: /\.(s?(c|a)ss)(\?v=\d+\.\d+\.\d+)?$/i,
|
|
150
|
+
use: [
|
|
151
|
+
{
|
|
152
|
+
loader: "style-loader"
|
|
153
|
+
}, {
|
|
154
|
+
loader: 'css-loader',
|
|
155
|
+
options: {
|
|
156
|
+
importLoaders: 1,
|
|
157
|
+
modules: false,
|
|
158
|
+
sourceMap: false,
|
|
159
|
+
url: false
|
|
160
|
+
},
|
|
161
|
+
}, {
|
|
162
|
+
loader: "sass-loader"
|
|
163
|
+
},
|
|
164
|
+
],
|
|
165
|
+
exclude: [/.OLD/]
|
|
166
|
+
},
|
|
167
|
+
|
|
168
|
+
// css-loader and less-loader
|
|
169
|
+
{
|
|
170
|
+
test: /\.(less)(\?v=\d+\.\d+\.\d+)?$/i,
|
|
171
|
+
use: [
|
|
172
|
+
{
|
|
173
|
+
loader: "style-loader"
|
|
174
|
+
}, {
|
|
175
|
+
loader: "css-loader",
|
|
176
|
+
options: {
|
|
177
|
+
sourceMap: true,
|
|
178
|
+
modules: true,
|
|
179
|
+
url: false
|
|
180
|
+
}
|
|
181
|
+
}, {
|
|
182
|
+
loader: "less-loader"
|
|
183
|
+
},
|
|
184
|
+
],
|
|
185
|
+
exclude: [/.OLD/]
|
|
186
|
+
},
|
|
187
|
+
|
|
188
|
+
// assets
|
|
189
|
+
{
|
|
190
|
+
test: /\.(a?png|jpe?g|gif|ico|bmp|webb|svg)(\?v=\d+\.\d+\.\d+)?$/i,
|
|
191
|
+
type: 'asset/resource',
|
|
192
|
+
exclude: [/node_modules/, /.OLD/],
|
|
193
|
+
},
|
|
194
|
+
|
|
195
|
+
// fonts
|
|
196
|
+
{
|
|
197
|
+
test: /\.(woff(2)?|ttf|eot)(\?v=\d+\.\d+\.\d+)?$/i,
|
|
198
|
+
type: 'asset/resource',
|
|
199
|
+
exclude: [/node_modules/, /.OLD/],
|
|
200
|
+
},
|
|
201
|
+
|
|
202
|
+
],
|
|
203
|
+
},
|
|
204
|
+
|
|
205
|
+
plugins: [
|
|
206
|
+
|
|
207
|
+
//Environment
|
|
208
|
+
new webpack.DefinePlugin({
|
|
209
|
+
'process.env.NODE_ENV': JSON.stringify(argv.mode),
|
|
210
|
+
'process.env': dotenv.parsed,
|
|
211
|
+
'process.env.debug': argv.mode === 'development' ? true : false
|
|
212
|
+
}),
|
|
213
|
+
|
|
214
|
+
new CopyPlugin({
|
|
215
|
+
patterns: [
|
|
216
|
+
{
|
|
217
|
+
from: "./public",
|
|
218
|
+
to: "./",
|
|
219
|
+
noErrorOnMissing: true,
|
|
220
|
+
globOptions: {
|
|
221
|
+
gitignore: true
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
{ from: "./.github", to: "./.github" },
|
|
225
|
+
//{ from: "./typings", to: "./" },
|
|
226
|
+
{ from: "./documents", to: "./" }
|
|
227
|
+
],
|
|
228
|
+
options: {
|
|
229
|
+
concurrency: 100,
|
|
230
|
+
}
|
|
231
|
+
})
|
|
232
|
+
|
|
233
|
+
]
|
|
234
|
+
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
|
package/index.js.LICENSE.txt
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-dom.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @license React
|
|
13
|
-
* react.production.min.js
|
|
14
|
-
*
|
|
15
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
16
|
-
*
|
|
17
|
-
* This source code is licensed under the MIT license found in the
|
|
18
|
-
* LICENSE file in the root directory of this source tree.
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* @license React
|
|
23
|
-
* scheduler.production.min.js
|
|
24
|
-
*
|
|
25
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
26
|
-
*
|
|
27
|
-
* This source code is licensed under the MIT license found in the
|
|
28
|
-
* LICENSE file in the root directory of this source tree.
|
|
29
|
-
*/
|