nattoppet 2.1.1 → 4.1.0
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/GUIDE.md +732 -0
- package/LICENSE +21 -0
- package/dist/common.ymd +94 -0
- package/dist/form.css +87 -0
- package/dist/form.js +64 -0
- package/dist/form.ymd +36 -0
- package/dist/katex.css +1 -0
- package/dist/katex.ymd +13 -0
- package/dist/koa.css +157 -0
- package/{koa/after.ymd → dist/koa.ymd} +18 -1
- package/dist/nattoppet-dev.js +84 -0
- package/dist/nattoppet-init.js +140 -0
- package/dist/nattoppet-native.js +116 -0
- package/dist/nattoppet.js +87083 -0
- package/dist/ppt.css +304 -0
- package/dist/ppt.js +83 -0
- package/{ppt/after.ymd → dist/ppt.ymd} +17 -1
- package/dist/tml.css +125 -0
- package/dist/tml.js +3 -0
- package/{tml/after.ymd → dist/tml.ymd} +19 -1
- package/dist/vue.css +91 -0
- package/dist/vue.ymd +23 -0
- package/package.json +37 -13
- package/readme.md +33 -14
- package/.editorconfig +0 -15
- package/assets/katex.css +0 -1
- package/assets/manuscript.cls +0 -30
- package/common.ymd +0 -74
- package/compiler.js +0 -120
- package/koa/before.ymd +0 -12
- package/koa/koa.less +0 -179
- package/native/Cargo.toml +0 -13
- package/native/build.rs +0 -12
- package/native/src/main.rs +0 -22
- package/nattoppet-dev.js +0 -58
- package/nattoppet-native.js +0 -49
- package/nattoppet.js +0 -26
- package/ppt/before.ymd +0 -8
- package/ppt/ppt.coffee +0 -61
- package/ppt/ppt.less +0 -222
- package/stdlib.js +0 -108
- package/tml/before.ymd +0 -10
- package/tml/tml.coffee +0 -1
- package/tml/tml.less +0 -145
- package/vue/after.ymd +0 -9
- package/vue/before.ymd +0 -9
- package/vue/vue.less +0 -101
package/package.json
CHANGED
|
@@ -1,20 +1,44 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nattoppet",
|
|
3
|
+
"version": "4.1.0",
|
|
3
4
|
"description": "A tiny macro-based markup language for blogging",
|
|
4
|
-
"author": "
|
|
5
|
-
"
|
|
5
|
+
"author": "ylxdzsw <ylxdzsw@gmail.com>",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"GUIDE.md",
|
|
11
|
+
"readme.md"
|
|
12
|
+
],
|
|
13
|
+
"bin": {
|
|
14
|
+
"nattoppet": "./dist/nattoppet.js",
|
|
15
|
+
"nattoppet-dev": "./dist/nattoppet-dev.js",
|
|
16
|
+
"nattoppet-init": "./dist/nattoppet-init.js",
|
|
17
|
+
"nattoppet-native": "./dist/nattoppet-native.js"
|
|
18
|
+
},
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "node scripts/build-package.mjs",
|
|
21
|
+
"build:binary": "bun build ./nattoppet.ts --compile --outfile=./binary-dist/nattoppet",
|
|
22
|
+
"prepack": "npm run build",
|
|
23
|
+
"dev": "node nattoppet-dev.ts",
|
|
24
|
+
"test": "node --test",
|
|
25
|
+
"test:bun": "bun test",
|
|
26
|
+
"test:watch": "node --test --watch",
|
|
27
|
+
"compile": "node nattoppet.ts",
|
|
28
|
+
"init": "node nattoppet-init.ts",
|
|
29
|
+
"native": "node nattoppet-native.ts"
|
|
30
|
+
},
|
|
6
31
|
"dependencies": {
|
|
7
|
-
"coffeescript": "^2.
|
|
8
|
-
"html-minifier": "^
|
|
9
|
-
"katex": "
|
|
10
|
-
"less": "^4.
|
|
11
|
-
"marked": "^
|
|
32
|
+
"coffeescript": "^2.7.0",
|
|
33
|
+
"html-minifier-terser": "^7.2.0",
|
|
34
|
+
"katex": "0.16.45",
|
|
35
|
+
"less": "^4.2.0",
|
|
36
|
+
"marked": "^9.1.6"
|
|
12
37
|
},
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"nattoppet-dev": "./nattoppet-dev.js",
|
|
16
|
-
"nattoppet-native": "./nattoppet-native.js"
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"esbuild": "^0.25.0"
|
|
17
40
|
},
|
|
18
|
-
"
|
|
19
|
-
|
|
41
|
+
"engines": {
|
|
42
|
+
"node": ">=22.18.0"
|
|
43
|
+
}
|
|
20
44
|
}
|
package/readme.md
CHANGED
|
@@ -1,33 +1,52 @@
|
|
|
1
1
|
nattoppet
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
|
-
A tiny markup language and
|
|
5
|
-
executable.
|
|
4
|
+
A tiny markup language and themes for making documents, slides, or web apps as single-file bundled html or executables.
|
|
6
5
|
|
|
7
6
|
### Usage
|
|
8
7
|
|
|
9
|
-
|
|
8
|
+
Install Nattoppet with Node.js 22.18 or newer:
|
|
10
9
|
|
|
11
|
-
```
|
|
12
|
-
|
|
10
|
+
```bash
|
|
11
|
+
npm install -g nattoppet
|
|
13
12
|
```
|
|
14
13
|
|
|
15
|
-
|
|
14
|
+
Compile a nattoppet file:
|
|
16
15
|
|
|
17
|
-
```
|
|
18
|
-
|
|
16
|
+
```bash
|
|
17
|
+
nattoppet in.ymd > out.html
|
|
19
18
|
```
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
Compile a nattoppet file but don't minimize (for debugging):
|
|
22
21
|
|
|
22
|
+
```bash
|
|
23
|
+
nattoppet in.ymd --dev > out.html
|
|
23
24
|
```
|
|
24
|
-
|
|
25
|
+
|
|
26
|
+
Open a browser to preview a nattoppet file; rebuild every time the page is refreshed:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
nattoppet-dev in.ymd
|
|
25
30
|
```
|
|
26
31
|
|
|
27
|
-
|
|
32
|
+
Initialize a new project:
|
|
28
33
|
|
|
34
|
+
```bash
|
|
35
|
+
nattoppet-init form
|
|
29
36
|
```
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
37
|
+
|
|
38
|
+
Build a double-clickable executable for the page:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
nattoppet-native init
|
|
42
|
+
# (edit the metadata as needed)
|
|
43
|
+
nattoppet-native build in.ymd
|
|
33
44
|
```
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
### History
|
|
48
|
+
|
|
49
|
+
- 1.0: This project started as an experiment of co.js to replicate gulp.js, when async/await was not a thing and wind.js was the cool guy that everyone was talking about.
|
|
50
|
+
- 2.0: Later I decided to build ymd.js, a custom LaTeX-style macro-based markup language for blogging, and turned nattoppet a bundler. Promise landed on JavaScript, and async/await became available with babel.
|
|
51
|
+
- 3.0: I became a minimalist and stripped down all dependencies, merged ymd.js and nattoppet, and flattened the directory. I have also migrated to Deno to further remove the nodejs clutters.
|
|
52
|
+
- 4.0: AI came. As an experimental project, nattoppet was put to test AI. Kimi 2.5 successfully ported it from Deno to Bun in half an hour, with all posts on my blog builds without error. It made me feel empty, but I have to embrace it. This project will be fully vibed from now on.
|
package/.editorconfig
DELETED