reaxes-utils 1.0.0 → 1.0.1
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/index.js +2 -0
- package/index.js.map +1 -0
- package/package.json +12 -51
- package/types/ConditionRender.utility.d.ts +19 -0
- package/types/assert-group.utility.d.ts +6 -0
- package/types/checkGenericNull.utility.d.ts +1 -0
- package/types/checkType.utility.d.ts +2 -0
- package/types/cookie.utility.d.ts +7 -0
- package/types/crayon.utility.d.ts +9 -0
- package/types/dataflow.utility.d.ts +5 -0
- package/types/debounce.utility.d.ts +1 -0
- package/types/getNestedValue.utility.d.ts +2 -0
- package/{src/hooks/index.ts → types/hooks/index.d.ts} +1 -0
- package/types/hooks/useAsync.utility.d.ts +24 -0
- package/types/hooks/useForceUpdate.d.ts +1 -0
- package/types/hooks/useMountedRef.utility.d.ts +2 -0
- package/types/hooks/useRoute.utility.d.ts +5 -0
- package/types/hooks/useUndo.utility.d.ts +14 -0
- package/types/index.d.ts +23 -0
- package/types/isPromise.utility.d.ts +1 -0
- package/types/logProxy.utility.d.ts +1 -0
- package/types/makePair.utility.d.ts +1 -0
- package/types/orzPromise.utility.d.ts +4 -0
- package/types/overload.d.ts +1 -0
- package/types/queryString.utility.d.ts +6 -0
- package/types/random.utility.d.ts +5 -0
- package/types/replaceStr.utility.d.ts +1 -0
- package/types/runOnlyOnce.utility.d.ts +1 -0
- package/types/stringify.utility.d.ts +6 -0
- package/types/throttle.utility.d.ts +6 -0
- package/types/timer.utility.d.ts +14 -0
- package/types/tools.utility.d.ts +3 -0
- package/babel.config.js +0 -50
- package/src/ConditionRender.utility.tsx +0 -128
- package/src/assert-group.utility.ts +0 -70
- package/src/checkGenericNull.utility.ts +0 -18
- package/src/checkType.utility.ts +0 -44
- package/src/cookie.utility.ts +0 -124
- package/src/crayon.utility.ts +0 -149
- package/src/dataflow.utility.ts +0 -30
- package/src/debounce.utility.ts +0 -31
- package/src/getNestedValue.utility.ts +0 -47
- package/src/hooks/useAsync.utility.ts +0 -129
- package/src/hooks/useForceUpdate.tsx +0 -4
- package/src/hooks/useMountedRef.utility.ts +0 -20
- package/src/hooks/useUndo.utility.ts +0 -103
- package/src/index.tsx +0 -55
- package/src/isPromise.utility.ts +0 -10
- package/src/logProxy.utility.tsx +0 -7
- package/src/makePair.utility.ts +0 -18
- package/src/orzPromise.utility.ts +0 -24
- package/src/overload.ts +0 -17
- package/src/queryString.utility.ts +0 -77
- package/src/random.utility.ts +0 -73
- package/src/replaceStr.utility.ts +0 -15
- package/src/runOnlyOnce.utility.ts +0 -13
- package/src/stringify.utility.ts +0 -228
- package/src/throttle.utility.ts +0 -43
- package/src/timer.utility.ts +0 -103
- package/src/tools.utility.ts +0 -59
- package/src/workspace.d.ts +0 -43
- package/tsconfig.json +0 -89
- package/webpack.config.mjs +0 -205
package/webpack.config.mjs
DELETED
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
import webpack from 'webpack';
|
|
2
|
-
import portfinder from 'portfinder';
|
|
3
|
-
import { fileURLToPath } from 'url';
|
|
4
|
-
import _ from 'lodash';
|
|
5
|
-
import path from 'path';
|
|
6
|
-
import CopyWebpackPlugin from 'copy-webpack-plugin';
|
|
7
|
-
|
|
8
|
-
const {
|
|
9
|
-
DefinePlugin ,
|
|
10
|
-
ProvidePlugin,
|
|
11
|
-
} = webpack;
|
|
12
|
-
|
|
13
|
-
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
14
|
-
|
|
15
|
-
function getProvidePlugin () {
|
|
16
|
-
return new ProvidePlugin({
|
|
17
|
-
_ : ["lodash"] ,
|
|
18
|
-
React : ["react"] ,
|
|
19
|
-
useState : [
|
|
20
|
-
"react" ,
|
|
21
|
-
"useState" ,
|
|
22
|
-
] ,
|
|
23
|
-
useEffect : [
|
|
24
|
-
"react" ,
|
|
25
|
-
"useEffect" ,
|
|
26
|
-
] ,
|
|
27
|
-
useRef : [
|
|
28
|
-
"react" ,
|
|
29
|
-
"useRef" ,
|
|
30
|
-
] ,
|
|
31
|
-
useLayoutEffect : [
|
|
32
|
-
"react" ,
|
|
33
|
-
"useLayoutEffect" ,
|
|
34
|
-
] ,
|
|
35
|
-
useMemo : [
|
|
36
|
-
"react" ,
|
|
37
|
-
"useMemo" ,
|
|
38
|
-
] ,
|
|
39
|
-
useCallback : [
|
|
40
|
-
"react" ,
|
|
41
|
-
"useCallback" ,
|
|
42
|
-
] ,
|
|
43
|
-
});
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
const packages = path.resolve(__dirname , "../");
|
|
47
|
-
const getPort = () => {
|
|
48
|
-
portfinder.basePort = 8080;
|
|
49
|
-
return portfinder.getPortPromise();
|
|
50
|
-
};
|
|
51
|
-
const cssLoaderOptions = {
|
|
52
|
-
sourceMap : true ,
|
|
53
|
-
modules : {
|
|
54
|
-
exportLocalsConvention : "dashes" ,
|
|
55
|
-
localIdentName : "[local]--[hash:base64:4]" ,
|
|
56
|
-
|
|
57
|
-
} ,
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
export default {
|
|
62
|
-
entry : "./src/index.tsx" ,
|
|
63
|
-
output : {
|
|
64
|
-
libraryTarget : "module" ,
|
|
65
|
-
module : true ,
|
|
66
|
-
path : path.resolve(__dirname , 'dist') ,
|
|
67
|
-
filename : "index.js" ,
|
|
68
|
-
} ,
|
|
69
|
-
resolve : {
|
|
70
|
-
alias : {
|
|
71
|
-
'@@root' : __dirname ,
|
|
72
|
-
'@@packages/*' : path.resolve(__dirname , "../") ,
|
|
73
|
-
'@@utils/*' : path.resolve(__dirname , 'src/*') ,
|
|
74
|
-
} ,
|
|
75
|
-
extensions : [
|
|
76
|
-
'.ts' ,
|
|
77
|
-
'.tsx' ,
|
|
78
|
-
'.js' ,
|
|
79
|
-
'.jsx' ,
|
|
80
|
-
'.json' ,
|
|
81
|
-
] ,
|
|
82
|
-
} ,
|
|
83
|
-
devtool : 'source-map' ,
|
|
84
|
-
experiments : {
|
|
85
|
-
outputModule : true ,
|
|
86
|
-
} , // stats : 'errors-only' ,
|
|
87
|
-
module : {
|
|
88
|
-
rules : [
|
|
89
|
-
{
|
|
90
|
-
test : /\.(jsx?|tsx?)$/ ,
|
|
91
|
-
use : {
|
|
92
|
-
loader : 'babel-loader' ,
|
|
93
|
-
options : {
|
|
94
|
-
sourceMap : true ,
|
|
95
|
-
} ,
|
|
96
|
-
} ,
|
|
97
|
-
exclude : /node_modules/ ,
|
|
98
|
-
} ,
|
|
99
|
-
{
|
|
100
|
-
test : /\.module\.less$/ ,
|
|
101
|
-
use : [
|
|
102
|
-
{
|
|
103
|
-
loader : 'style-loader' ,
|
|
104
|
-
} ,
|
|
105
|
-
{
|
|
106
|
-
loader : 'css-loader' ,
|
|
107
|
-
options : cssLoaderOptions ,
|
|
108
|
-
} ,
|
|
109
|
-
{
|
|
110
|
-
loader : 'less-loader' ,
|
|
111
|
-
options : {
|
|
112
|
-
sourceMap : true ,
|
|
113
|
-
lessOptions : {
|
|
114
|
-
javascriptEnabled : true ,
|
|
115
|
-
} ,
|
|
116
|
-
} ,
|
|
117
|
-
} ,
|
|
118
|
-
] ,
|
|
119
|
-
} ,
|
|
120
|
-
{
|
|
121
|
-
test : /(?<!\.module)\.less$/ ,
|
|
122
|
-
use : [
|
|
123
|
-
{
|
|
124
|
-
loader : 'style-loader' ,
|
|
125
|
-
} ,
|
|
126
|
-
{
|
|
127
|
-
loader : 'css-loader' ,
|
|
128
|
-
options : _.pick(cssLoaderOptions , ["sourceMap"]) ,
|
|
129
|
-
} ,
|
|
130
|
-
{
|
|
131
|
-
loader : 'less-loader' ,
|
|
132
|
-
options : {
|
|
133
|
-
sourceMap : true ,
|
|
134
|
-
lessOptions : {
|
|
135
|
-
javascriptEnabled : true ,
|
|
136
|
-
} ,
|
|
137
|
-
} ,
|
|
138
|
-
} ,
|
|
139
|
-
] ,
|
|
140
|
-
} ,
|
|
141
|
-
{
|
|
142
|
-
test : /\.module\.css$/ ,
|
|
143
|
-
use : [
|
|
144
|
-
{
|
|
145
|
-
loader : 'style-loader' ,
|
|
146
|
-
} ,
|
|
147
|
-
{
|
|
148
|
-
loader : 'css-loader' ,
|
|
149
|
-
options : cssLoaderOptions ,
|
|
150
|
-
} ,
|
|
151
|
-
] ,
|
|
152
|
-
} ,
|
|
153
|
-
{
|
|
154
|
-
test : /(?<!\.module)\.css$/ ,
|
|
155
|
-
use : [
|
|
156
|
-
{
|
|
157
|
-
loader : 'style-loader' ,
|
|
158
|
-
} ,
|
|
159
|
-
{
|
|
160
|
-
loader : 'css-loader' ,
|
|
161
|
-
options : _.pick(cssLoaderOptions , ["sourceMap"]) ,
|
|
162
|
-
} ,
|
|
163
|
-
] ,
|
|
164
|
-
} ,
|
|
165
|
-
{
|
|
166
|
-
test : /\.(png|jpe?g|te?xt|gif|woff|woff2|eot|ttf|otf|bmp|swf)$/ ,
|
|
167
|
-
type : "asset/resource" ,
|
|
168
|
-
generator : {
|
|
169
|
-
filename : 'static/[hash][ext][query]' ,
|
|
170
|
-
} ,
|
|
171
|
-
parser : {
|
|
172
|
-
dataUrlCondition : {
|
|
173
|
-
maxSize : 20 * 1024 ,
|
|
174
|
-
} ,
|
|
175
|
-
} ,
|
|
176
|
-
} ,
|
|
177
|
-
{
|
|
178
|
-
test : /\.component\.svg$/ ,
|
|
179
|
-
use : ["@svgr/webpack"] ,
|
|
180
|
-
|
|
181
|
-
} ,
|
|
182
|
-
{
|
|
183
|
-
test : /(?<!\.component)\.svg$/ ,
|
|
184
|
-
type : "asset/resource" ,
|
|
185
|
-
|
|
186
|
-
} ,
|
|
187
|
-
] ,
|
|
188
|
-
} ,
|
|
189
|
-
mode : "production" ,
|
|
190
|
-
performance : {
|
|
191
|
-
maxEntrypointSize : 10000000 ,
|
|
192
|
-
maxAssetSize : 30000000 ,
|
|
193
|
-
} ,
|
|
194
|
-
plugins : [
|
|
195
|
-
getProvidePlugin() ,
|
|
196
|
-
new CopyWebpackPlugin({
|
|
197
|
-
patterns : [
|
|
198
|
-
{
|
|
199
|
-
from : "src/types.d.ts" ,
|
|
200
|
-
to : "types.d.ts" ,
|
|
201
|
-
},
|
|
202
|
-
],
|
|
203
|
-
}),
|
|
204
|
-
] ,
|
|
205
|
-
};
|