flo-mat 3.0.3 → 3.0.4
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/browser/index.js +30087 -0
- package/browser/index.min.js +1 -1
- package/d.bat +4 -0
- package/newdocs/d.bat +4 -0
- package/node/cp-node/fs/traverse-edges.d.ts +1 -3
- package/node/cp-node/fs/traverse-edges.js +1 -34
- package/node/cp-node/fs/traverse-edges.js.map +1 -1
- package/node/debug/functions/draw-elem/draw-mat.js +2 -5
- package/node/debug/functions/draw-elem/draw-mat.js.map +1 -1
- package/package.json +19 -20
- package/src/cp-node/fs/traverse-edges.ts +1 -50
- package/src/debug/functions/draw-elem/draw-mat.ts +5 -12
- package/tsconfig.json +5 -4
- package/webpack.config.cjs +83 -63
- package/node/utils/sleep.d.ts +0 -2
- package/node/utils/sleep.js +0 -5
- package/node/utils/sleep.js.map +0 -1
package/d.bat
ADDED
package/newdocs/d.bat
ADDED
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import { CpNode } from '../cp-node.js';
|
|
2
|
-
declare function traverseEdges$$(cpNode: CpNode, traverseEdgesCallback: (cpNode: CpNode) => Promise<void>): Promise<void>;
|
|
3
2
|
declare function traverseEdges(cpNode: CpNode, traverseEdgesCallback: (cpNode: CpNode) => void): void;
|
|
4
|
-
|
|
5
|
-
export { traverseEdges, $traverseEdges, traverseEdges$$ };
|
|
3
|
+
export { traverseEdges };
|
|
@@ -1,28 +1,5 @@
|
|
|
1
1
|
import { isTerminating } from './is-terminating.js';
|
|
2
2
|
import { getAllOnLoop } from './get-all-on-loop.js';
|
|
3
|
-
// function traverseEdges2(
|
|
4
|
-
// cpNode: CpNode,
|
|
5
|
-
// traverseEdgesCallback: (cpNode: CpNode) => void) {
|
|
6
|
-
// // Since the tree is unrooted we must iterate in all directions from the
|
|
7
|
-
// // given vertex.
|
|
8
|
-
// const cps = getAllOnCircle(cpNode);
|
|
9
|
-
// while (cps.length) {
|
|
10
|
-
// const cp = cps.pop()!;
|
|
11
|
-
// traverseEdgesCallback(cp);
|
|
12
|
-
// if (isTerminating(cp)) { continue; }
|
|
13
|
-
// cps.push(...getChildren(cp));
|
|
14
|
-
// }
|
|
15
|
-
// }
|
|
16
|
-
async function traverseEdges$$(cpNode, traverseEdgesCallback) {
|
|
17
|
-
const cpNodes = getAllOnLoop(cpNode);
|
|
18
|
-
const seen = new Set();
|
|
19
|
-
for (cpNode of cpNodes) {
|
|
20
|
-
if (!isTerminating(cpNode) && !seen.has(cpNode.next.prevOnCircle)) {
|
|
21
|
-
await traverseEdgesCallback(cpNode);
|
|
22
|
-
}
|
|
23
|
-
seen.add(cpNode);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
3
|
function traverseEdges(cpNode, traverseEdgesCallback) {
|
|
27
4
|
const cpNodes = getAllOnLoop(cpNode);
|
|
28
5
|
const seen = new Set();
|
|
@@ -33,15 +10,5 @@ function traverseEdges(cpNode, traverseEdgesCallback) {
|
|
|
33
10
|
seen.add(cpNode);
|
|
34
11
|
}
|
|
35
12
|
}
|
|
36
|
-
|
|
37
|
-
const cpNodes = getAllOnLoop(cpNode);
|
|
38
|
-
const seen = new Set();
|
|
39
|
-
for (cpNode of cpNodes) {
|
|
40
|
-
if (!isTerminating(cpNode) && !seen.has(cpNode.next.prevOnCircle)) {
|
|
41
|
-
yield cpNode;
|
|
42
|
-
}
|
|
43
|
-
seen.add(cpNode);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
export { traverseEdges, $traverseEdges, traverseEdges$$ };
|
|
13
|
+
export { traverseEdges };
|
|
47
14
|
//# sourceMappingURL=traverse-edges.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"traverse-edges.js","sourceRoot":"","sources":["../../../src/cp-node/fs/traverse-edges.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"traverse-edges.js","sourceRoot":"","sources":["../../../src/cp-node/fs/traverse-edges.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGpD,SAAS,aAAa,CACpB,MAAc,EACd,qBAA+C;IAEhD,MAAM,OAAO,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;IACrC,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAE/B,KAAK,MAAM,IAAI,OAAO,EAAE,CAAC;QACxB,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC;YACnE,qBAAqB,CAAC,MAAM,CAAC,CAAC;QAC/B,CAAC;QACD,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAClB,CAAC;AACF,CAAC;AAGD,OAAO,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -8,7 +8,7 @@ const altClasses = [
|
|
|
8
8
|
'thin10 red nofill'
|
|
9
9
|
];
|
|
10
10
|
/** @internal */
|
|
11
|
-
|
|
11
|
+
function drawMat(g, mat, classes_, delay = 0, scaleFactor = 1) {
|
|
12
12
|
let cpNode = mat.cpNode;
|
|
13
13
|
if (!cpNode) {
|
|
14
14
|
return [];
|
|
@@ -18,8 +18,7 @@ const altClasses = [
|
|
|
18
18
|
}
|
|
19
19
|
const $svgs = [];
|
|
20
20
|
let i = 0;
|
|
21
|
-
traverseEdges(cpNode,
|
|
22
|
-
// await sleep(50);
|
|
21
|
+
traverseEdges(cpNode, cpNode => {
|
|
23
22
|
if (isTerminating(cpNode)) {
|
|
24
23
|
return;
|
|
25
24
|
}
|
|
@@ -32,7 +31,5 @@ const altClasses = [
|
|
|
32
31
|
});
|
|
33
32
|
return $svgs;
|
|
34
33
|
}
|
|
35
|
-
function drawCurve() {
|
|
36
|
-
}
|
|
37
34
|
export { drawMat };
|
|
38
35
|
//# sourceMappingURL=draw-mat.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"draw-mat.js","sourceRoot":"","sources":["../../../../src/debug/functions/draw-elem/draw-mat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,
|
|
1
|
+
{"version":3,"file":"draw-mat.js","sourceRoot":"","sources":["../../../../src/debug/functions/draw-elem/draw-mat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAG1D,MAAM,EAAE,aAAa,EAAE,GAAG,QAAQ,CAAC;AAGnC,MAAM,UAAU,GAAG;IACf,oBAAoB;IACpB,mBAAmB;CACtB,CAAC;AAEF,gBAAgB;AAChB,SAAS,OAAO,CACR,CAAc,EACd,GAAQ,EACR,QAAiB,EACjB,KAAK,GAAG,CAAC,EACT,WAAW,GAAG,CAAC;IAEnB,IAAI,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;IACxB,IAAI,CAAC,MAAM,EAAE,CAAC;QAAC,OAAO,EAAE,CAAC;IAAC,CAAC;IAE3B,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,CAAC;QAAC,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC;IAAC,CAAC;IAExD,MAAM,KAAK,GAAiB,EAAE,CAAC;IAE/B,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE;QAC3B,IAAI,aAAa,CAAC,MAAM,CAAC,EAAE,CAAC;YAAC,OAAO;QAAC,CAAC;QAEtC,MAAM,MAAM,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;QACzC,IAAI,CAAC,MAAM,EAAE,CAAC;YAAC,OAAO;QAAC,CAAC;QAExB,KAAK,CAAC,IAAI,CAAE,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,GAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;QACjE,CAAC,EAAE,CAAC;IACR,CAAC,CAAC,CAAC;IAEH,OAAO,KAAK,CAAC;AACjB,CAAC;AAGD,OAAO,EAAE,OAAO,EAAE,CAAA"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "flo-mat",
|
|
3
3
|
"sideEffects": false,
|
|
4
4
|
"description": "Medial / Scale Axis Transform (MAT/SAT) Library.",
|
|
5
|
-
"version": "3.0.
|
|
5
|
+
"version": "3.0.4",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Floris Steenkamp"
|
|
8
8
|
},
|
|
@@ -31,38 +31,37 @@
|
|
|
31
31
|
"skeleton"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"big-float-ts": "^4.0.
|
|
35
|
-
"double-double": "^3.0.
|
|
36
|
-
"flo-bezier3": "^6.0.
|
|
37
|
-
"flo-boolean": "^
|
|
38
|
-
"flo-draw": "^2.0.
|
|
39
|
-
"flo-gauss-quadrature": "^2.1.
|
|
40
|
-
"flo-ll-rb-tree": "^0.3.
|
|
34
|
+
"big-float-ts": "^4.0.2",
|
|
35
|
+
"double-double": "^3.0.4",
|
|
36
|
+
"flo-bezier3": "^6.0.7",
|
|
37
|
+
"flo-boolean": "^5.0.1",
|
|
38
|
+
"flo-draw": "^2.0.5",
|
|
39
|
+
"flo-gauss-quadrature": "^2.1.4",
|
|
40
|
+
"flo-ll-rb-tree": "^0.3.4",
|
|
41
41
|
"flo-memoize": "^1.1.1",
|
|
42
|
-
"flo-poly": "^7.0.
|
|
43
|
-
"flo-vector2d": "^4.0.
|
|
42
|
+
"flo-poly": "^7.0.2",
|
|
43
|
+
"flo-vector2d": "^4.0.6"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/chai": "^5.2.3",
|
|
47
47
|
"@types/mocha": "^10.0.10",
|
|
48
|
-
"@types/node": "^
|
|
49
|
-
"c8": "^
|
|
50
|
-
"chai": "^6.2.
|
|
48
|
+
"@types/node": "^25.6.0",
|
|
49
|
+
"c8": "^11.0.0",
|
|
50
|
+
"chai": "^6.2.2",
|
|
51
51
|
"circular-dependency-plugin": "^5.2.2",
|
|
52
52
|
"mocha": "^11.7.5",
|
|
53
|
-
"
|
|
54
|
-
"rimraf": "^6.1.2",
|
|
53
|
+
"rimraf": "^6.1.3",
|
|
55
54
|
"source-map-support": "^0.5.21",
|
|
56
|
-
"ts-loader": "^9.5.
|
|
55
|
+
"ts-loader": "^9.5.7",
|
|
57
56
|
"ts-node": "^10.9.2",
|
|
58
|
-
"typescript": "^
|
|
59
|
-
"webpack": "^5.
|
|
60
|
-
"webpack-cli": "^
|
|
57
|
+
"typescript": "^6.0.3",
|
|
58
|
+
"webpack": "^5.106.2",
|
|
59
|
+
"webpack-cli": "^7.0.2"
|
|
61
60
|
},
|
|
62
61
|
"scripts": {
|
|
63
62
|
"build": "npm run build-browser && npm run build-node",
|
|
64
63
|
"build-node": "rimraf node && tsc",
|
|
65
|
-
"build-browser": "rimraf browser && webpack",
|
|
64
|
+
"build-browser": "rimraf browser && webpack --mode production",
|
|
66
65
|
"test": "mocha",
|
|
67
66
|
"coverage": "c8 mocha",
|
|
68
67
|
"test-package": "npm pack"
|
|
@@ -1,44 +1,8 @@
|
|
|
1
1
|
import { CpNode } from '../cp-node.js';
|
|
2
|
-
import { getAllOnCircle } from './get-all-on-circle.js';
|
|
3
2
|
import { isTerminating } from './is-terminating.js';
|
|
4
|
-
import { getChildren } from './get-children.js';
|
|
5
3
|
import { getAllOnLoop } from './get-all-on-loop.js';
|
|
6
4
|
|
|
7
5
|
|
|
8
|
-
// function traverseEdges2(
|
|
9
|
-
// cpNode: CpNode,
|
|
10
|
-
// traverseEdgesCallback: (cpNode: CpNode) => void) {
|
|
11
|
-
|
|
12
|
-
// // Since the tree is unrooted we must iterate in all directions from the
|
|
13
|
-
// // given vertex.
|
|
14
|
-
// const cps = getAllOnCircle(cpNode);
|
|
15
|
-
|
|
16
|
-
// while (cps.length) {
|
|
17
|
-
// const cp = cps.pop()!;
|
|
18
|
-
// traverseEdgesCallback(cp);
|
|
19
|
-
|
|
20
|
-
// if (isTerminating(cp)) { continue; }
|
|
21
|
-
// cps.push(...getChildren(cp));
|
|
22
|
-
// }
|
|
23
|
-
// }
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
async function traverseEdges$$(
|
|
27
|
-
cpNode: CpNode,
|
|
28
|
-
traverseEdgesCallback: (cpNode: CpNode) => Promise<void>) {
|
|
29
|
-
|
|
30
|
-
const cpNodes = getAllOnLoop(cpNode);
|
|
31
|
-
const seen = new Set<CpNode>();
|
|
32
|
-
|
|
33
|
-
for (cpNode of cpNodes) {
|
|
34
|
-
if (!isTerminating(cpNode) && !seen.has(cpNode.next.prevOnCircle)) {
|
|
35
|
-
await traverseEdgesCallback(cpNode);
|
|
36
|
-
}
|
|
37
|
-
seen.add(cpNode);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
6
|
function traverseEdges(
|
|
43
7
|
cpNode: CpNode,
|
|
44
8
|
traverseEdgesCallback: (cpNode: CpNode) => void) {
|
|
@@ -55,17 +19,4 @@ function traverseEdges(
|
|
|
55
19
|
}
|
|
56
20
|
|
|
57
21
|
|
|
58
|
-
|
|
59
|
-
const cpNodes = getAllOnLoop(cpNode);
|
|
60
|
-
const seen = new Set<CpNode>();
|
|
61
|
-
|
|
62
|
-
for (cpNode of cpNodes) {
|
|
63
|
-
if (!isTerminating(cpNode) && !seen.has(cpNode.next.prevOnCircle)) {
|
|
64
|
-
yield cpNode;
|
|
65
|
-
}
|
|
66
|
-
seen.add(cpNode);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
export { traverseEdges, $traverseEdges, traverseEdges$$ }
|
|
22
|
+
export { traverseEdges }
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { drawFs } from 'flo-draw';
|
|
2
2
|
import { Mat } from '../../../mat/mat.js';
|
|
3
|
-
import {
|
|
3
|
+
import { traverseEdges } from '../../../cp-node/fs/traverse-edges.js';
|
|
4
4
|
import { getMatCurveToNext } from '../../../cp-node/fs/get-mat-curve-to-next.js';
|
|
5
5
|
import { CpNodeFs } from '../../../cp-node/cp-node-fs.js';
|
|
6
|
-
|
|
7
|
-
import { sleep } from '../../../utils/sleep.js';
|
|
6
|
+
|
|
8
7
|
|
|
9
8
|
const { isTerminating } = CpNodeFs;
|
|
10
9
|
|
|
@@ -15,12 +14,12 @@ const altClasses = [
|
|
|
15
14
|
];
|
|
16
15
|
|
|
17
16
|
/** @internal */
|
|
18
|
-
|
|
17
|
+
function drawMat(
|
|
19
18
|
g: SVGGElement,
|
|
20
19
|
mat: Mat,
|
|
21
20
|
classes_?: string,
|
|
22
21
|
delay = 0,
|
|
23
|
-
scaleFactor = 1):
|
|
22
|
+
scaleFactor = 1): SVGElement[] {
|
|
24
23
|
|
|
25
24
|
let cpNode = mat.cpNode;
|
|
26
25
|
if (!cpNode) { return []; }
|
|
@@ -30,8 +29,7 @@ const altClasses = [
|
|
|
30
29
|
const $svgs: SVGElement[] = [];
|
|
31
30
|
|
|
32
31
|
let i = 0;
|
|
33
|
-
traverseEdges(cpNode,
|
|
34
|
-
// await sleep(50);
|
|
32
|
+
traverseEdges(cpNode, cpNode => {
|
|
35
33
|
if (isTerminating(cpNode)) { return; }
|
|
36
34
|
|
|
37
35
|
const bezier = getMatCurveToNext(cpNode);
|
|
@@ -45,9 +43,4 @@ const altClasses = [
|
|
|
45
43
|
}
|
|
46
44
|
|
|
47
45
|
|
|
48
|
-
function drawCurve() {
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
46
|
export { drawMat }
|
package/tsconfig.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
"strict": true,
|
|
4
|
-
"module": "
|
|
5
|
-
"target": "
|
|
4
|
+
"module": "esnext",
|
|
5
|
+
"target": "esnext",
|
|
6
6
|
"declaration": true,
|
|
7
7
|
"noEmitOnError": true,
|
|
8
8
|
"sourceMap": true,
|
|
9
|
-
"
|
|
10
|
-
"
|
|
9
|
+
"rootDir": "./src",
|
|
10
|
+
"outDir": "./node",
|
|
11
|
+
"moduleResolution": "bundler"
|
|
11
12
|
},
|
|
12
13
|
"include": [
|
|
13
14
|
"src/index.ts"
|
package/webpack.config.cjs
CHANGED
|
@@ -4,80 +4,100 @@
|
|
|
4
4
|
const path = require('path');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
const config_Basic = {
|
|
8
|
-
mode
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
7
|
+
const config_Basic = (env, argv) => {
|
|
8
|
+
const mode = argv.mode === 'production'
|
|
9
|
+
? 'production'
|
|
10
|
+
: 'development';
|
|
11
|
+
|
|
12
|
+
const devtool = mode === 'production'
|
|
13
|
+
? false
|
|
14
|
+
: 'eval-cheap-module-source-map';
|
|
15
|
+
|
|
16
|
+
return {
|
|
17
|
+
mode,
|
|
18
|
+
devtool,
|
|
19
|
+
output: {
|
|
20
|
+
path: path.resolve(__dirname, 'browser'),
|
|
21
|
+
library: { type: 'module' }
|
|
22
|
+
},
|
|
23
|
+
entry: './src/index.ts',
|
|
24
|
+
resolve: {
|
|
25
|
+
extensions: [
|
|
26
|
+
'.js', '.mjs', '.cjs',
|
|
27
|
+
'.jsx', '.cjsx', '.mjsx',
|
|
28
|
+
'.tsx', '.ts', '.d.ts'
|
|
29
|
+
],
|
|
30
|
+
extensionAlias: {
|
|
31
|
+
".js": [".js", ".ts"],
|
|
32
|
+
".cjs": [".cjs", ".cts"],
|
|
33
|
+
".mjs": [".mjs", ".mts"]
|
|
34
|
+
},
|
|
35
|
+
alias: {}
|
|
36
|
+
},
|
|
37
|
+
module: {
|
|
38
|
+
rules: [{
|
|
39
|
+
test: /\.tsx?$/,
|
|
40
|
+
use: [{
|
|
41
|
+
loader: 'ts-loader',
|
|
42
|
+
options: { silent: true }
|
|
43
|
+
}],
|
|
44
|
+
exclude: /node_modules/,
|
|
45
|
+
sideEffects: false
|
|
46
|
+
}]
|
|
47
|
+
},
|
|
48
|
+
stats: {
|
|
49
|
+
// Don't display most things
|
|
50
|
+
all: false,
|
|
51
|
+
colors: true,
|
|
52
|
+
errors: true,
|
|
53
|
+
builtAt: true
|
|
21
54
|
},
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
// Don't display most things
|
|
35
|
-
all: false,
|
|
36
|
-
colors: true,
|
|
37
|
-
errors: true,
|
|
38
|
-
builtAt: true
|
|
39
|
-
},
|
|
40
|
-
plugins: [
|
|
41
|
-
// new CircularDependencyPlugin({
|
|
42
|
-
// // exclude detection of files based on a RegExp
|
|
43
|
-
// exclude: /node_modules/,
|
|
44
|
-
// // add errors to webpack instead of warnings
|
|
45
|
-
// failOnError: true,
|
|
46
|
-
// // set the current working directory for displaying module paths
|
|
47
|
-
// cwd: process.cwd(),
|
|
48
|
-
// })
|
|
49
|
-
],
|
|
50
|
-
output: {
|
|
51
|
-
path: path.resolve(__dirname, 'browser'),
|
|
52
|
-
library: { type: 'module' }
|
|
53
|
-
},
|
|
54
|
-
experiments: { outputModule: true }
|
|
55
|
+
plugins: [
|
|
56
|
+
// new CircularDependencyPlugin({
|
|
57
|
+
// // exclude detection of files based on a RegExp
|
|
58
|
+
// exclude: /node_modules/,
|
|
59
|
+
// // add errors to webpack instead of warnings
|
|
60
|
+
// failOnError: true,
|
|
61
|
+
// // set the current working directory for displaying module paths
|
|
62
|
+
// cwd: process.cwd(),
|
|
63
|
+
// })
|
|
64
|
+
],
|
|
65
|
+
experiments: { outputModule: true }
|
|
66
|
+
};
|
|
55
67
|
}
|
|
56
68
|
|
|
57
69
|
|
|
58
70
|
/** ESM, minified */
|
|
59
|
-
const config_EsmMinify = {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
71
|
+
const config_EsmMinify = (env, argv) => {
|
|
72
|
+
const baseConfig = config_Basic(env, argv);
|
|
73
|
+
|
|
74
|
+
return {
|
|
75
|
+
...baseConfig,
|
|
76
|
+
output: {
|
|
77
|
+
...baseConfig.output,
|
|
78
|
+
filename: 'index.min.js',
|
|
79
|
+
},
|
|
80
|
+
optimization: { minimize: true }
|
|
81
|
+
};
|
|
66
82
|
};
|
|
67
83
|
|
|
68
84
|
|
|
69
85
|
/** ESM, not minified */
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
86
|
+
const config_EsmNoMinify = (env, argv) => {
|
|
87
|
+
const baseConfig = config_Basic(env, argv);
|
|
88
|
+
|
|
89
|
+
return {
|
|
90
|
+
...baseConfig,
|
|
91
|
+
output: {
|
|
92
|
+
...baseConfig.output,
|
|
93
|
+
filename: 'index.js',
|
|
94
|
+
},
|
|
95
|
+
optimization: { minimize: false },
|
|
96
|
+
};
|
|
97
|
+
};
|
|
78
98
|
|
|
79
99
|
|
|
80
100
|
module.exports = [
|
|
81
101
|
config_EsmMinify,
|
|
82
|
-
|
|
102
|
+
config_EsmNoMinify
|
|
83
103
|
];
|
package/node/utils/sleep.d.ts
DELETED
package/node/utils/sleep.js
DELETED
package/node/utils/sleep.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sleep.js","sourceRoot":"","sources":["../../src/utils/sleep.ts"],"names":[],"mappings":"AACA,SAAS,KAAK,CAAC,EAAU;IACrB,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AAC3D,CAAC;AAGD,OAAO,EAAE,KAAK,EAAE,CAAA"}
|