@yammelvin/nnnsum 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/ .aaa +1 -0
- package/.aaa +1 -0
- package/.aaa.txt +1 -0
- package/.vscode/settings.json +9 -0
- package/README.md +14 -0
- package/b/skdfjsdf +1 -0
- package/nnmain.mjs +21 -0
- package/nnmain2.mjs +1 -0
- package/nnnsum.mjs +3 -0
- package/package.json +20 -0
- package/src/abc.ejs +36 -0
- package/src/abc.json +30 -0
- package/src/common.css +33 -0
- package/src/def.json +4 -0
- package/src/def.pug +8 -0
- package/src/m.ejs +0 -0
- package/src/stamp.svg +67 -0
- package/src/width.1200.css +20 -0
- package/src/width.400.css +22 -0
- package/src/width.800.css +22 -0
- package/t2.mjs +33 -0
- package/t3.mjs +7 -0
- package/webdirbuilder.mjs +220 -0
package/ .aaa
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
hhh
|
package/.aaa
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
hhh
|
package/.aaa.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
hhh
|
@@ -0,0 +1,9 @@
|
|
1
|
+
{
|
2
|
+
"html.format.wrapLineLength": 160,
|
3
|
+
"html.format.indentInnerHtml": true,
|
4
|
+
"editor.tabSize": 2,
|
5
|
+
"html.format.extraLiners": "",
|
6
|
+
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": true,
|
7
|
+
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": true,
|
8
|
+
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": true,
|
9
|
+
}
|
package/README.md
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
# This is H1 heading
|
2
|
+
## This is H2 heading
|
3
|
+
### This is H3 heading
|
4
|
+
|
5
|
+
Welcome to ___MY PAGE!!___
|
6
|
+
|
7
|
+
This is my paragraph. This i is my paragraph. This i is my paragraph. This i is my paragraph. This i is my paragraph. This i is my paragraph. This i is my paragraph. This i is my paragraph. This i is my paragraph. This i is my paragraph. This i is my paragraph. This i is my paragraph. This i is my paragraph.
|
8
|
+
|
9
|
+
| # Date | # Name | # Age |
|
10
|
+
| --- | --- | --- |
|
11
|
+
| 2024 | John | 12 |
|
12
|
+
| 2025 | Smith | ksdfj |
|
13
|
+
| --- | --- | --- |
|
14
|
+
|
package/b/skdfjsdf
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
sdf
|
package/nnmain.mjs
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
async function pause() {
|
2
|
+
console.log( "pause started" );
|
3
|
+
var p = new Promise(resolve => {
|
4
|
+
setTimeout(resolve, 2000);
|
5
|
+
});
|
6
|
+
await p;
|
7
|
+
console.log( "pause ended" );
|
8
|
+
}
|
9
|
+
|
10
|
+
function main() {
|
11
|
+
var p = null;
|
12
|
+
for( var i = 0; i < 10; i++ ) {
|
13
|
+
if ( p === null ) {
|
14
|
+
p = pause();
|
15
|
+
} else {
|
16
|
+
p = p.then( pause);
|
17
|
+
}
|
18
|
+
}
|
19
|
+
}
|
20
|
+
|
21
|
+
main();
|
package/nnmain2.mjs
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
async function pause(){console.log("pause started");var e=new Promise((e=>{setTimeout(e,2e3)}));await e,console.log("pause ended")}function main(){for(var e=null,n=0;n<10;n++)e=null===e?pause():e.then(pause)}main();
|
package/nnnsum.mjs
ADDED
package/package.json
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
{
|
2
|
+
"name": "@yammelvin/nnnsum",
|
3
|
+
"version": "1.0.1",
|
4
|
+
"description": "",
|
5
|
+
"license": "ISC",
|
6
|
+
"author": "author",
|
7
|
+
"type": "module",
|
8
|
+
"main": "nnnsum.mjs",
|
9
|
+
"scripts": {
|
10
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
11
|
+
},
|
12
|
+
"dependencies": {
|
13
|
+
"clean-css": "^5.3.3",
|
14
|
+
"ejs": "^3.1.10",
|
15
|
+
"html-minifier-terser": "^7.2.0",
|
16
|
+
"pug": "^3.0.3",
|
17
|
+
"sass": "^1.84.0",
|
18
|
+
"terser": "^5.38.1"
|
19
|
+
}
|
20
|
+
}
|
package/src/abc.ejs
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="UTF-8" />
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" />
|
6
|
+
|
7
|
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto+Condensed&display=swap" />
|
8
|
+
<link rel="stylesheet" href="common.css" />
|
9
|
+
<link rel="stylesheet" href="width.1200.css" />
|
10
|
+
<link rel="stylesheet" href="width.800.css" />
|
11
|
+
<link rel="stylesheet" href="width.400.css" />
|
12
|
+
<link rel="icon" href="stamp.svg" />
|
13
|
+
|
14
|
+
<title><%= title %></title>
|
15
|
+
</head>
|
16
|
+
<body>
|
17
|
+
<div id="main-container" class="container">
|
18
|
+
<div class="title"><%= title %></div>
|
19
|
+
<% imgSets.forEach( imgSet => { %>
|
20
|
+
<% if ( imgSet.visible ) { %>
|
21
|
+
<div class="item-panel">
|
22
|
+
<% imgSet.imgSrcs.forEach( imgSrc => { %>
|
23
|
+
<% if ( imgSrc === "" ) { %>
|
24
|
+
<br>
|
25
|
+
<% } else { %>
|
26
|
+
<a href="<%= imgSrc %>" target="_viewstamp">
|
27
|
+
<img class="item" src="<%= imgSrc %>">
|
28
|
+
</a>
|
29
|
+
<% } %>
|
30
|
+
<% } ); %>
|
31
|
+
</div>
|
32
|
+
<% } %>
|
33
|
+
<% } ); %>
|
34
|
+
</div>
|
35
|
+
</body>
|
36
|
+
</html>
|
package/src/abc.json
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
{
|
2
|
+
"title": "China, 1987-1997, Water Margin Sets 01-05",
|
3
|
+
"imgSets": [
|
4
|
+
{
|
5
|
+
"visible": true,
|
6
|
+
"imgSrcs": [
|
7
|
+
"https://i.postimg.cc/Wbz67rTx/china-water-margin-01-1987-T123-4-1.webp",
|
8
|
+
"https://i.postimg.cc/pXSQcTdr/china-water-margin-01-1987-T123-4-2.webp",
|
9
|
+
"https://i.postimg.cc/W1JGBvDn/china-water-margin-01-1987-T123-4-3.webp",
|
10
|
+
"https://i.postimg.cc/zfCnfFFH/china-water-margin-01-1987-T123-4-4.webp",
|
11
|
+
"https://i.postimg.cc/wvFLXxP6/china-water-margin-02-1989-T138-4-1.webp",
|
12
|
+
"https://i.postimg.cc/HsdFW60X/china-water-margin-02-1989-T138-4-2.webp",
|
13
|
+
"https://i.postimg.cc/Ssctk9Jg/china-water-margin-02-1989-T138-4-3.webp",
|
14
|
+
"https://i.postimg.cc/x1FZRYw3/china-water-margin-02-1989-T138-4-4.webp",
|
15
|
+
"https://i.postimg.cc/MGCrC5Kc/china-water-margin-03-1991-T167-4-1.webp",
|
16
|
+
"https://i.postimg.cc/yxPQSzh9/china-water-margin-03-1991-T167-4-2.webp",
|
17
|
+
"https://i.postimg.cc/rwznz3D0/china-water-margin-03-1991-T167-4-3.webp",
|
18
|
+
"https://i.postimg.cc/DzXxPGd7/china-water-margin-03-1991-T167-4-4.webp",
|
19
|
+
"https://i.postimg.cc/cHGX9JXw/china-water-margin-04-1993-10-4-1.webp",
|
20
|
+
"https://i.postimg.cc/1X9MSjxz/china-water-margin-04-1993-10-4-2.webp",
|
21
|
+
"https://i.postimg.cc/7hm9ZnDn/china-water-margin-04-1993-10-4-3.webp",
|
22
|
+
"https://i.postimg.cc/YqC8yZfn/china-water-margin-04-1993-10-4-4.webp",
|
23
|
+
"https://i.postimg.cc/vZ1hGnK5/china-water-margin-05-1997-21-4-1.webp",
|
24
|
+
"https://i.postimg.cc/50mqsSHW/china-water-margin-05-1997-21-4-2.webp",
|
25
|
+
"https://i.postimg.cc/nrcKg97j/china-water-margin-05-1997-21-4-3.webp",
|
26
|
+
"https://i.postimg.cc/xjt3HgDK/china-water-margin-05-1997-21-4-4.webp"
|
27
|
+
]
|
28
|
+
}
|
29
|
+
]
|
30
|
+
}
|
package/src/common.css
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
body {
|
2
|
+
margin: 0px;
|
3
|
+
padding: 0px;
|
4
|
+
background-color: black;
|
5
|
+
font-family: "Roboto Condensed", sans-serif;
|
6
|
+
text-size-adjust: none;
|
7
|
+
}
|
8
|
+
|
9
|
+
.container {
|
10
|
+
margin: 0px auto 100px auto;
|
11
|
+
padding: 0px;
|
12
|
+
}
|
13
|
+
|
14
|
+
.title {
|
15
|
+
padding: 0px;
|
16
|
+
font-weight: bold;
|
17
|
+
color: white;
|
18
|
+
}
|
19
|
+
|
20
|
+
.item-panel {
|
21
|
+
padding: 0px;
|
22
|
+
}
|
23
|
+
|
24
|
+
.item {
|
25
|
+
margin: 0px;
|
26
|
+
padding: 0px;
|
27
|
+
min-width: 160px;
|
28
|
+
vertical-align: middle;
|
29
|
+
}
|
30
|
+
|
31
|
+
a {
|
32
|
+
text-decoration: none;
|
33
|
+
}
|
package/src/def.json
ADDED
package/src/def.pug
ADDED
package/src/m.ejs
ADDED
File without changes
|
package/src/stamp.svg
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
<svg viewBox="0 0 500 500" xmlns="http://www.w3.org/2000/svg">
|
2
|
+
<path style="fill:#A7ACAD;"
|
3
|
+
d="M 500 142.857 C 500 131.259 494.473 120.946 485.902 114.429 C 481 110.696 481 103.598 485.902 99.866 C 494.473 93.339 500 83.027 500 71.429 C 500 53.982 487.491 39.455 470.946 36.33 C 467.223 35.625 464.375 32.777 463.67 29.054 C 460.545 12.509 446.018 0 428.571 0 C 416.973 0 406.661 5.527 400.143 14.098 C 396.411 19 389.313 19 385.58 14.098 C 379.054 5.527 368.741 0 357.143 0 C 345.545 0 335.232 5.527 328.714 14.098 C 324.982 19 317.884 19 314.152 14.098 C 307.625 5.527 297.313 0 285.714 0 C 274.116 0 263.804 5.527 257.286 14.098 C 253.554 19 246.455 19 242.723 14.098 C 236.196 5.527 225.884 0 214.286 0 C 202.688 0 192.375 5.527 185.857 14.098 C 182.125 19 175.027 19 171.295 14.098 C 164.768 5.527 154.455 0 142.857 0 C 131.259 0 120.946 5.527 114.429 14.098 C 110.696 19 103.598 19 99.866 14.098 C 93.339 5.527 83.027 0 71.429 0 C 53.982 0 39.455 12.509 36.33 29.054 C 35.634 32.786 32.786 35.634 29.054 36.33 C 12.509 39.455 0 53.982 0 71.429 C 0 83.027 5.527 93.339 14.098 99.857 C 19 103.589 19 110.688 14.098 114.42 C 5.527 120.946 0 131.259 0 142.857 C 0 154.455 5.527 164.768 14.098 171.286 C 19 175.018 19 182.116 14.098 185.848 C 5.527 192.375 0 202.688 0 214.286 C 0 225.884 5.527 236.196 14.098 242.714 C 19 246.446 19 253.545 14.098 257.277 C 5.527 263.804 0 274.116 0 285.714 C 0 297.313 5.527 307.625 14.098 314.143 C 19 317.875 19 324.973 14.098 328.705 C 5.527 335.232 0 345.545 0 357.143 C 0 368.741 5.527 379.054 14.098 385.571 C 19 389.304 19 396.402 14.098 400.134 C 5.527 406.661 0 416.973 0 428.571 C 0 446.018 12.518 460.545 29.054 463.67 C 32.777 464.375 35.625 467.223 36.33 470.946 C 39.455 487.482 53.982 500 71.429 500 C 83.027 500 93.339 494.473 99.857 485.902 C 103.589 481 110.688 481 114.42 485.902 C 120.946 494.473 131.259 500 142.857 500 C 154.455 500 164.768 494.473 171.286 485.902 C 175.018 481 182.116 481 185.848 485.902 C 192.375 494.473 202.688 500 214.286 500 C 225.884 500 236.196 494.473 242.714 485.902 C 246.446 481 253.545 481 257.277 485.902 C 263.804 494.473 274.116 500 285.714 500 C 297.313 500 307.625 494.473 314.143 485.902 C 317.875 481 324.973 481 328.705 485.902 C 335.232 494.473 345.545 500 357.143 500 C 368.741 500 379.054 494.473 385.571 485.902 C 389.304 481 396.402 481 400.134 485.902 C 406.661 494.473 416.973 500 428.571 500 C 446.018 500 460.545 487.482 463.67 470.946 C 464.375 467.223 467.223 464.375 470.946 463.67 C 487.482 460.545 500 446.018 500 428.571 C 500 416.973 494.473 406.661 485.902 400.143 C 481 396.411 481 389.313 485.902 385.58 C 494.473 379.054 500 368.741 500 357.143 C 500 345.545 494.473 335.232 485.902 328.714 C 481 324.982 481 317.884 485.902 314.152 C 494.473 307.625 500 297.313 500 285.714 C 500 274.116 494.473 263.804 485.902 257.286 C 481 253.554 481 246.455 485.902 242.723 C 494.473 236.196 500 225.884 500 214.286 C 500 202.688 494.473 192.375 485.902 185.857 C 481 182.125 481 175.027 485.902 171.295 C 494.473 164.768 500 154.455 500 142.857 Z"></path>
|
4
|
+
<path style="fill:#1081E0;"
|
5
|
+
d="M 422.161 437.5 L 77.839 437.5 C 69.366 437.5 62.5 430.634 62.5 422.161 L 62.5 77.839 C 62.5 69.366 69.366 62.5 77.839 62.5 L 422.17 62.5 C 430.634 62.5 437.5 69.366 437.5 77.839 L 437.5 422.17 C 437.5 430.634 430.634 437.5 422.161 437.5 Z"></path>
|
6
|
+
<path style="fill:#FFFFFF;"
|
7
|
+
d="M 205.357 401.786 C 175.813 401.786 151.786 377.759 151.786 348.214 C 151.786 318.67 175.813 294.643 205.357 294.643 C 234.902 294.643 258.929 318.67 258.929 348.214 C 258.929 377.759 234.902 401.786 205.357 401.786 Z M 205.357 312.5 C 185.661 312.5 169.643 328.518 169.643 348.214 C 169.643 367.911 185.661 383.929 205.357 383.929 C 225.054 383.929 241.071 367.911 241.071 348.214 C 241.071 328.518 225.054 312.5 205.357 312.5 Z"></path>
|
8
|
+
<path style="fill:#FFFFFF;"
|
9
|
+
d="M 312.509 330.357 C 309.938 330.357 307.393 329.259 305.625 327.134 C 299.518 319.777 289.759 319.777 283.652 327.134 C 280.518 330.92 274.884 331.464 271.08 328.304 C 267.286 325.152 266.768 319.536 269.911 315.732 C 276.411 307.884 285.196 303.571 294.643 303.571 C 304.089 303.571 312.875 307.884 319.375 315.723 C 322.527 319.527 322 325.152 318.205 328.295 C 316.536 329.688 314.518 330.357 312.509 330.357 Z"></path>
|
10
|
+
<path style="fill:#FFFFFF;"
|
11
|
+
d="M 330.357 339.286 C 320.911 339.286 312.125 334.973 305.625 327.134 C 302.473 323.33 303 317.705 306.795 314.563 C 310.589 311.402 316.232 311.938 319.366 315.732 C 325.473 323.089 335.232 323.089 341.339 315.732 C 344.482 311.946 350.116 311.411 353.911 314.563 C 357.705 317.714 358.223 323.33 355.08 327.134 C 348.589 334.973 339.804 339.286 330.357 339.286 Z"></path>
|
12
|
+
<path style="fill:#FFFFFF;"
|
13
|
+
d="M 383.938 330.357 C 381.366 330.357 378.821 329.259 377.054 327.134 C 370.946 319.777 361.188 319.777 355.08 327.134 C 351.946 330.92 346.321 331.464 342.509 328.304 C 338.714 325.152 338.196 319.536 341.339 315.732 C 347.839 307.884 356.625 303.571 366.071 303.571 C 375.518 303.571 384.304 307.884 390.804 315.723 C 393.955 319.527 393.429 325.152 389.634 328.295 C 387.964 329.688 385.946 330.357 383.938 330.357 Z"></path>
|
14
|
+
<path style="fill:#FFFFFF;"
|
15
|
+
d="M 312.509 383.929 C 309.938 383.929 307.393 382.83 305.625 380.705 C 299.518 373.348 289.759 373.348 283.652 380.705 C 280.518 384.5 274.884 385.045 271.08 381.875 C 267.286 378.723 266.768 373.107 269.911 369.304 C 276.411 361.455 285.196 357.143 294.643 357.143 C 304.089 357.143 312.875 361.455 319.375 369.295 C 322.527 373.098 322 378.723 318.205 381.866 C 316.536 383.259 314.518 383.929 312.509 383.929 Z"></path>
|
16
|
+
<path style="fill:#FFFFFF;"
|
17
|
+
d="M 330.357 392.857 C 320.911 392.857 312.125 388.545 305.625 380.705 C 302.473 376.902 303 371.277 306.795 368.134 C 310.589 364.973 316.232 365.509 319.366 369.304 C 325.473 376.661 335.232 376.661 341.339 369.304 C 344.482 365.518 350.116 364.982 353.911 368.134 C 357.705 371.286 358.223 376.902 355.08 380.705 C 348.589 388.545 339.804 392.857 330.357 392.857 Z"></path>
|
18
|
+
<path style="fill:#FFFFFF;"
|
19
|
+
d="M 383.938 383.929 C 381.366 383.929 378.821 382.83 377.054 380.705 C 370.946 373.348 361.188 373.348 355.08 380.705 C 351.946 384.5 346.321 385.045 342.509 381.875 C 338.714 378.723 338.196 373.107 341.339 369.304 C 347.839 361.455 356.625 357.143 366.071 357.143 C 375.518 357.143 384.304 361.455 390.804 369.295 C 393.955 373.098 393.429 378.723 389.634 381.866 C 387.964 383.259 385.946 383.929 383.938 383.929 Z"></path>
|
20
|
+
<circle style="fill:#A7ACAD;" cx="129.464" cy="401.786" r="8.929"></circle>
|
21
|
+
<circle style="fill:#A7ACAD;" cx="129.464" cy="348.214" r="8.929"></circle>
|
22
|
+
<circle style="fill:#A7ACAD;" cx="102.679" cy="375" r="8.929"></circle>
|
23
|
+
<circle style="fill:#A7ACAD;" cx="129.464" cy="294.643" r="8.929"></circle>
|
24
|
+
<circle style="fill:#A7ACAD;" cx="102.679" cy="321.429" r="8.929"></circle>
|
25
|
+
<circle style="fill:#A7ACAD;" cx="129.464" cy="241.071" r="8.929"></circle>
|
26
|
+
<circle style="fill:#A7ACAD;" cx="183.036" cy="241.071" r="8.929"></circle>
|
27
|
+
<circle style="fill:#A7ACAD;" cx="236.607" cy="241.071" r="8.929"></circle>
|
28
|
+
<circle style="fill:#A7ACAD;" cx="290.179" cy="241.071" r="8.929"></circle>
|
29
|
+
<circle style="fill:#A7ACAD;" cx="343.75" cy="241.071" r="8.929"></circle>
|
30
|
+
<circle style="fill:#A7ACAD;" cx="397.321" cy="241.071" r="8.929"></circle>
|
31
|
+
<circle style="fill:#A7ACAD;" cx="102.679" cy="267.857" r="8.929"></circle>
|
32
|
+
<circle style="fill:#A7ACAD;" cx="156.25" cy="267.857" r="8.929"></circle>
|
33
|
+
<circle style="fill:#A7ACAD;" cx="209.821" cy="267.857" r="8.929"></circle>
|
34
|
+
<circle style="fill:#A7ACAD;" cx="263.393" cy="267.857" r="8.929"></circle>
|
35
|
+
<circle style="fill:#A7ACAD;" cx="316.964" cy="267.857" r="8.929"></circle>
|
36
|
+
<circle style="fill:#A7ACAD;" cx="370.536" cy="267.857" r="8.929"></circle>
|
37
|
+
<circle style="fill:#A7ACAD;" cx="129.464" cy="187.5" r="8.929"></circle>
|
38
|
+
<circle style="fill:#A7ACAD;" cx="183.036" cy="187.5" r="8.929"></circle>
|
39
|
+
<circle style="fill:#A7ACAD;" cx="236.607" cy="187.5" r="8.929"></circle>
|
40
|
+
<circle style="fill:#A7ACAD;" cx="290.179" cy="187.5" r="8.929"></circle>
|
41
|
+
<circle style="fill:#A7ACAD;" cx="343.75" cy="187.5" r="8.929"></circle>
|
42
|
+
<circle style="fill:#A7ACAD;" cx="397.321" cy="187.5" r="8.929"></circle>
|
43
|
+
<circle style="fill:#A7ACAD;" cx="102.679" cy="214.286" r="8.929"></circle>
|
44
|
+
<circle style="fill:#A7ACAD;" cx="156.25" cy="214.286" r="8.929"></circle>
|
45
|
+
<circle style="fill:#A7ACAD;" cx="209.821" cy="214.286" r="8.929"></circle>
|
46
|
+
<circle style="fill:#A7ACAD;" cx="263.393" cy="214.286" r="8.929"></circle>
|
47
|
+
<circle style="fill:#A7ACAD;" cx="316.964" cy="214.286" r="8.929"></circle>
|
48
|
+
<circle style="fill:#A7ACAD;" cx="370.536" cy="214.286" r="8.929"></circle>
|
49
|
+
<circle style="fill:#A7ACAD;" cx="129.464" cy="133.929" r="8.929"></circle>
|
50
|
+
<circle style="fill:#A7ACAD;" cx="183.036" cy="133.929" r="8.929"></circle>
|
51
|
+
<circle style="fill:#A7ACAD;" cx="236.607" cy="133.929" r="8.929"></circle>
|
52
|
+
<circle style="fill:#A7ACAD;" cx="290.179" cy="133.929" r="8.929"></circle>
|
53
|
+
<circle style="fill:#A7ACAD;" cx="343.75" cy="133.929" r="8.929"></circle>
|
54
|
+
<circle style="fill:#A7ACAD;" cx="397.321" cy="133.929" r="8.929"></circle>
|
55
|
+
<circle style="fill:#A7ACAD;" cx="102.679" cy="160.714" r="8.929"></circle>
|
56
|
+
<circle style="fill:#A7ACAD;" cx="156.25" cy="160.714" r="8.929"></circle>
|
57
|
+
<circle style="fill:#A7ACAD;" cx="209.821" cy="160.714" r="8.929"></circle>
|
58
|
+
<circle style="fill:#A7ACAD;" cx="263.393" cy="160.714" r="8.929"></circle>
|
59
|
+
<circle style="fill:#A7ACAD;" cx="316.964" cy="160.714" r="8.929"></circle>
|
60
|
+
<circle style="fill:#A7ACAD;" cx="370.536" cy="160.714" r="8.929"></circle>
|
61
|
+
<circle style="fill:#A7ACAD;" cx="102.679" cy="107.143" r="8.929"></circle>
|
62
|
+
<circle style="fill:#A7ACAD;" cx="156.25" cy="107.143" r="8.929"></circle>
|
63
|
+
<circle style="fill:#A7ACAD;" cx="209.821" cy="107.143" r="8.929"></circle>
|
64
|
+
<circle style="fill:#A7ACAD;" cx="263.393" cy="107.143" r="8.929"></circle>
|
65
|
+
<circle style="fill:#A7ACAD;" cx="316.964" cy="107.143" r="8.929"></circle>
|
66
|
+
<circle style="fill:#A7ACAD;" cx="370.536" cy="107.143" r="8.929"></circle>
|
67
|
+
</svg>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
@media (max-width: 400px) {
|
2
|
+
.container {
|
3
|
+
max-width: 400px;
|
4
|
+
}
|
5
|
+
|
6
|
+
hr {
|
7
|
+
margin: 10px 5px;
|
8
|
+
}
|
9
|
+
|
10
|
+
.title {
|
11
|
+
margin: 20px 5px;
|
12
|
+
font-size: 20px;
|
13
|
+
}
|
14
|
+
|
15
|
+
.item-panel {
|
16
|
+
margin: 20px 5px;
|
17
|
+
}
|
18
|
+
|
19
|
+
.item {
|
20
|
+
width: calc(25% - 3px);
|
21
|
+
}
|
22
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
@media (max-width: 800px) {
|
2
|
+
.container {
|
3
|
+
max-width: 800px;
|
4
|
+
}
|
5
|
+
|
6
|
+
hr {
|
7
|
+
margin: 20px 10px;
|
8
|
+
}
|
9
|
+
|
10
|
+
.title {
|
11
|
+
margin: 40px 10px;
|
12
|
+
font-size: 40px;
|
13
|
+
}
|
14
|
+
|
15
|
+
.item-panel {
|
16
|
+
margin: 40px 10px;
|
17
|
+
}
|
18
|
+
|
19
|
+
.item {
|
20
|
+
width: calc(25% - 3px);
|
21
|
+
}
|
22
|
+
}
|
package/t2.mjs
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
import { default as FS } from 'fs';
|
2
|
+
import { default as PATH } from 'path';
|
3
|
+
import { default as PUG } from 'pug';
|
4
|
+
|
5
|
+
async function pause() {
|
6
|
+
var p = new Promise( resolve => { setTimeout( resolve, 2000 ); } );
|
7
|
+
console.log( "pause started" );
|
8
|
+
await p;
|
9
|
+
console.log( "pause ended" );
|
10
|
+
}
|
11
|
+
|
12
|
+
function main() {
|
13
|
+
for ( var i = 0; i < 3; i++ ) {
|
14
|
+
console.log( "enter" + i );
|
15
|
+
pause();
|
16
|
+
console.log( "exit" + i );
|
17
|
+
}
|
18
|
+
}
|
19
|
+
|
20
|
+
function main2() {
|
21
|
+
var pugContent = FS.readFileSync( 'src/def.pug', 'utf-8' );
|
22
|
+
console.log( pugContent );
|
23
|
+
var pugData = FS.readFileSync( 'src/def.json', 'utf-8' );
|
24
|
+
console.log( pugData );
|
25
|
+
|
26
|
+
var htmlContent = PUG.render( pugContent, JSON.parse( pugData ) );
|
27
|
+
console.log( htmlContent );
|
28
|
+
// FS.writeFileSync( 'src/def.html', htmlContent );
|
29
|
+
|
30
|
+
|
31
|
+
}
|
32
|
+
|
33
|
+
main2();
|
package/t3.mjs
ADDED
@@ -0,0 +1,220 @@
|
|
1
|
+
import { default as FS } from 'fs';
|
2
|
+
import { default as PATH } from 'path';
|
3
|
+
|
4
|
+
import { default as HTML_MINIFIER } from 'html-minifier-terser';
|
5
|
+
import { default as CLEAN_CSS } from 'clean-css';
|
6
|
+
import * as TERSER from 'terser';
|
7
|
+
import SASS from 'sass';
|
8
|
+
import * as EJS from 'ejs';
|
9
|
+
import { default as PUG } from 'pug';
|
10
|
+
|
11
|
+
const HTML_MINIFIER_OPTIONS = { minifyCSS: true, minifyJS: true, removeComments: true, collapseWhitespace: true };
|
12
|
+
const CSS_CLEANER = new CLEAN_CSS();
|
13
|
+
|
14
|
+
export function removePath( path ) {
|
15
|
+
if ( !FS.existsSync( path ) ) {
|
16
|
+
console.log( '\'' + path + '\' does not exist.' );
|
17
|
+
return;
|
18
|
+
}
|
19
|
+
|
20
|
+
var stats = FS.lstatSync( path );
|
21
|
+
if ( stats.isDirectory() ) {
|
22
|
+
var entries = FS.readdirSync( path, 'utf8' );
|
23
|
+
entries.forEach( entry => removePath( PATH.resolve( path, entry ) ) );
|
24
|
+
|
25
|
+
console.log( 'Removing directory \'' + path + '\'' );
|
26
|
+
FS.rmdirSync( path );
|
27
|
+
}
|
28
|
+
else if ( stats.isFile() ) {
|
29
|
+
console.log( 'Removing file \'' + path + '\'' );
|
30
|
+
FS.unlinkSync( path );
|
31
|
+
}
|
32
|
+
else if ( stats.isSymbolicLink() ) {
|
33
|
+
console.log( 'Removing symbolic link \'' + path + '\'' );
|
34
|
+
FS.unlinkSync( path );
|
35
|
+
}
|
36
|
+
}
|
37
|
+
|
38
|
+
function copyFile( sourcePath, targetPath ) {
|
39
|
+
console.log( 'Copying file \'' + sourcePath + '\' to \'' + targetPath + '\' ...' );
|
40
|
+
FS.copyFileSync( sourcePath, targetPath );
|
41
|
+
}
|
42
|
+
|
43
|
+
function replacePathExt( path, ext ) {
|
44
|
+
return PATH.join( PATH.dirname( path ), PATH.basename( path, PATH.extname( path ) ) + ext );
|
45
|
+
}
|
46
|
+
|
47
|
+
async function processJsMjsFile( sourcePath, targetPath, toMinify ) {
|
48
|
+
if ( !toMinify ) {
|
49
|
+
copyFile( sourcePath, targetPath );
|
50
|
+
return;
|
51
|
+
}
|
52
|
+
|
53
|
+
console.log( 'Minifying file \'' + sourcePath + '\' to \'' + targetPath + '\' ...' );
|
54
|
+
var content = FS.readFileSync( sourcePath, 'utf8' );
|
55
|
+
|
56
|
+
var result = await TERSER.minify( content );
|
57
|
+
if ( result.error !== undefined ) {
|
58
|
+
throw result.error;
|
59
|
+
}
|
60
|
+
FS.writeFileSync( targetPath, result.code );
|
61
|
+
}
|
62
|
+
|
63
|
+
async function processHtmlSvgFile( sourcePath, targetPath, toMinify ) {
|
64
|
+
if ( !toMinify ) {
|
65
|
+
copyFile( sourcePath, targetPath );
|
66
|
+
return;
|
67
|
+
}
|
68
|
+
|
69
|
+
console.log( 'Minifying file \'' + sourcePath + '\' to \'' + targetPath + '\' ...' );
|
70
|
+
var content = FS.readFileSync( sourcePath, 'utf8' );
|
71
|
+
var result = await HTML_MINIFIER.minify( content, HTML_MINIFIER_OPTIONS );
|
72
|
+
FS.writeFileSync( targetPath, result );
|
73
|
+
}
|
74
|
+
|
75
|
+
function processCssFile( sourcePath, targetPath, toMinify ) {
|
76
|
+
if ( !toMinify ) {
|
77
|
+
copyFile( sourcePath, targetPath );
|
78
|
+
return;
|
79
|
+
}
|
80
|
+
|
81
|
+
console.log( 'Minifying file \'' + sourcePath + '\' to \'' + targetPath + '\' ...' );
|
82
|
+
var content = FS.readFileSync( sourcePath, 'utf8' );
|
83
|
+
var result = CSS_CLEANER.minify( content );
|
84
|
+
if ( result.errors.length > 0 ) {
|
85
|
+
throw result.errors;
|
86
|
+
}
|
87
|
+
FS.writeFileSync( targetPath, result.styles );
|
88
|
+
}
|
89
|
+
|
90
|
+
function processJsonFile( sourcePath, targetPath, toMinify ) {
|
91
|
+
if ( !toMinify ) {
|
92
|
+
copyFile( sourcePath, targetPath );
|
93
|
+
return;
|
94
|
+
}
|
95
|
+
|
96
|
+
console.log( 'Minifying file \'' + sourcePath + '\' to \'' + targetPath + '\' ...' );
|
97
|
+
var content = FS.readFileSync( sourcePath, 'utf8' );
|
98
|
+
var result = JSON.stringify( JSON.parse( content ) );
|
99
|
+
FS.writeFileSync( targetPath, result );
|
100
|
+
}
|
101
|
+
|
102
|
+
function processSassScssFile( sourcePath, targetPath, toMinify ) {
|
103
|
+
console.log( 'Building file \'' + sourcePath + '\' to \'' + targetPath + '\' ...' );
|
104
|
+
var content = FS.readFileSync( sourcePath, 'utf8' );
|
105
|
+
var sassResult = SASS.compileString( content );
|
106
|
+
|
107
|
+
if ( !toMinify ) {
|
108
|
+
FS.writeFileSync( targetPath, sassResult.css );
|
109
|
+
return;
|
110
|
+
}
|
111
|
+
|
112
|
+
var minifyResult = CSS_CLEANER.minify( sassResult.css );
|
113
|
+
if ( minifyResult.errors.length > 0 ) {
|
114
|
+
throw minifyResult.errors;
|
115
|
+
}
|
116
|
+
FS.writeFileSync( targetPath, minifyResult.styles );
|
117
|
+
}
|
118
|
+
|
119
|
+
async function processEjsFile( sourcePath, sourceJsonPath, targetPath, toMinify ) {
|
120
|
+
console.log( 'Building file \'' + sourcePath + '\' to \'' + targetPath + '\' ...' );
|
121
|
+
var ejsContent = FS.readFileSync( sourcePath, 'utf8' );
|
122
|
+
var jsonContent = FS.readFileSync( sourceJsonPath, 'utf8' );
|
123
|
+
|
124
|
+
var ejsResult = EJS.render( ejsContent, JSON.parse( jsonContent ) );
|
125
|
+
|
126
|
+
if ( !toMinify ) {
|
127
|
+
FS.writeFileSync( targetPath, ejsResult );
|
128
|
+
return;
|
129
|
+
}
|
130
|
+
|
131
|
+
var minifyResult = await HTML_MINIFIER.minify( ejsResult, HTML_MINIFIER_OPTIONS );
|
132
|
+
FS.writeFileSync( targetPath, minifyResult );
|
133
|
+
}
|
134
|
+
|
135
|
+
async function processPugFile( sourcePath, sourceJsonPath, targetPath, toMinify ) {
|
136
|
+
console.log( 'Building file \'' + sourcePath + '\' to \'' + targetPath + '\' ...' );
|
137
|
+
var pugContent = FS.readFileSync( sourcePath, 'utf8' );
|
138
|
+
var jsonContent = FS.readFileSync( sourceJsonPath, 'utf8' );
|
139
|
+
|
140
|
+
var pugResult = PUG.render( pugContent, JSON.parse( jsonContent ) );
|
141
|
+
|
142
|
+
if ( !toMinify ) {
|
143
|
+
FS.writeFileSync( targetPath, pugResult );
|
144
|
+
return;
|
145
|
+
}
|
146
|
+
|
147
|
+
var minifyResult = await HTML_MINIFIER.minify( pugResult, HTML_MINIFIER_OPTIONS );
|
148
|
+
FS.writeFileSync( targetPath, minifyResult );
|
149
|
+
}
|
150
|
+
|
151
|
+
export function buildPath( sourcePath, targetPath, toMinify = true ) {
|
152
|
+
if ( !FS.existsSync( sourcePath ) ) {
|
153
|
+
console.log( '\'' + sourcePath + '\' does not exist.' );
|
154
|
+
return;
|
155
|
+
}
|
156
|
+
|
157
|
+
var stats = FS.lstatSync( sourcePath );
|
158
|
+
if ( stats.isDirectory() ) {
|
159
|
+
if ( !FS.existsSync( targetPath ) ) {
|
160
|
+
console.log( 'Creating directory \'' + targetPath + '\' ...' );
|
161
|
+
FS.mkdirSync( targetPath, { recursive: true } );
|
162
|
+
}
|
163
|
+
|
164
|
+
var entries = FS.readdirSync( sourcePath );
|
165
|
+
entries.forEach( entry => buildPath( PATH.resolve( sourcePath, entry ), PATH.resolve( targetPath, entry ), toMinify ) );
|
166
|
+
}
|
167
|
+
else if ( stats.isFile() ) {
|
168
|
+
var sourceExt = PATH.extname( sourcePath );
|
169
|
+
switch ( sourceExt ) {
|
170
|
+
case '.js':
|
171
|
+
case '.mjs':
|
172
|
+
processJsMjsFile( sourcePath, targetPath, toMinify );
|
173
|
+
break;
|
174
|
+
case '.html':
|
175
|
+
case '.svg':
|
176
|
+
processHtmlSvgFile( sourcePath, targetPath, toMinify );
|
177
|
+
break;
|
178
|
+
case '.css':
|
179
|
+
processCssFile( sourcePath, targetPath, toMinify );
|
180
|
+
break;
|
181
|
+
case '.sass':
|
182
|
+
case '.scss':
|
183
|
+
targetPath = replacePathExt( targetPath, '.css' );
|
184
|
+
processSassScssFile( sourcePath, targetPath, toMinify );
|
185
|
+
break;
|
186
|
+
case '.ejs':
|
187
|
+
var sourceJsonPath = replacePathExt( sourcePath, '.json' );
|
188
|
+
if ( FS.existsSync( sourceJsonPath ) ) {
|
189
|
+
targetPath = replacePathExt( targetPath, '.html' );
|
190
|
+
processEjsFile( sourcePath, sourceJsonPath, targetPath, toMinify );
|
191
|
+
}
|
192
|
+
else {
|
193
|
+
copyFile( sourcePath, targetPath );
|
194
|
+
}
|
195
|
+
break;
|
196
|
+
case '.pug':
|
197
|
+
var sourceJsonPath = replacePathExt( sourcePath, '.json' );
|
198
|
+
if ( FS.existsSync( sourceJsonPath ) ) {
|
199
|
+
targetPath = replacePathExt( targetPath, '.html' );
|
200
|
+
processPugFile( sourcePath, sourceJsonPath, targetPath, toMinify );
|
201
|
+
}
|
202
|
+
else {
|
203
|
+
copyFile( sourcePath, targetPath );
|
204
|
+
}
|
205
|
+
break;
|
206
|
+
case '.json':
|
207
|
+
var sourceEjsPath = replacePathExt( sourcePath, '.ejs' );
|
208
|
+
var sourcePugPath = replacePathExt( sourcePath, '.pug' );
|
209
|
+
if ( !FS.existsSync( sourceEjsPath ) ) {
|
210
|
+
if ( !FS.existsSync( sourcePugPath ) ) {
|
211
|
+
processJsonFile( sourcePath, targetPath, toMinify );
|
212
|
+
}
|
213
|
+
}
|
214
|
+
break;
|
215
|
+
default:
|
216
|
+
copyFile( sourcePath, targetPath );
|
217
|
+
break;
|
218
|
+
}
|
219
|
+
}
|
220
|
+
}
|