vivth 1.0.3 → 1.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/README.md CHANGED
@@ -1676,10 +1676,12 @@ npm i vivth
1676
1676
  - this autodocumenter uses [chokidar](https://npmjs.com/package/chokidar) under the hood;
1677
1677
  - this class also is used to generate this `README.md`;
1678
1678
  - behaviours:
1679
- >1) export all named exported 'const'|'function'|'async function'|'class', alphanumeric name, started with Capital letter, same name with fileName on `options.pahts.file`;
1680
- >2) declare typedef of existing typedef with alphanumeric name, started with Capital letter, same name with fileName, and have no valid export like on point <sup>1</sup> on `options.pahts.file`;
1681
- >3) create `README.md` based on, `options.paths.dir` and `README.src.md`;
1682
- >4) extract `"at"description` jsdoc:
1679
+ >1) add `"at"noautodoc` on self closing jsdoc comment to opt out from generating documentation on said file;
1680
+ >>- auto export must follows the following rules, and there's no way to override;
1681
+ >2) export all named exported 'const'|'function'|'async function'|'class', alphanumeric name, started with Capital letter, same name with fileName on `options.pahts.file`;
1682
+ >3) declare typedef of existing typedef with alphanumeric name, started with Capital letter, same name with fileName, and have no valid export like on point <sup>1</sup> on `options.pahts.file`;
1683
+ >4) create `README.md` based on, `options.paths.dir` and `README.src.md`;
1684
+ >5) extract `"at"description` jsdoc:
1683
1685
  >>- on static/prop that have depths, all of children should have `"at"static`/`"at"instance` `nameOfImmediateParent`, same block but before `"at"description` comment line;
1684
1686
  >>- `"at"description` are treated as plain `markdown`;
1685
1687
  >>- first `"at"${string}` after `"at"description` until `"at"example` will be treated as `javascript` comment block on the `markdown`;
package/bun.lock CHANGED
@@ -10,7 +10,7 @@
10
10
  "devDependencies": {
11
11
  "@types/bun": "latest",
12
12
  "concurrently": "^9.2.1",
13
- "typescript": "^5.8.3",
13
+ "typescript": "^5.9.2",
14
14
  },
15
15
  },
16
16
  },
package/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  // @ts-check
2
2
 
3
3
  /**
4
- * automatically generated by `vivth.MJSautoDOC`
4
+ * automatically generated by `vivth.JSautoDOC`
5
5
  * @copyright
6
6
  * this library is made and distributed under MIT license;
7
7
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vivth",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "extremely simple signal as library primitives",
5
5
  "main": "index.mjs",
6
6
  "types": "./types/index.d.mts",
@@ -37,10 +37,12 @@ const acceptableExt = new Set(['.mjs', '.mts', '.ts']);
37
37
  * - this autodocumenter uses [chokidar](https://npmjs.com/package/chokidar) under the hood;
38
38
  * - this class also is used to generate this `README.md`;
39
39
  * - behaviours:
40
- * >1) export all named exported 'const'|'function'|'async function'|'class', alphanumeric name, started with Capital letter, same name with fileName on `options.pahts.file`;
41
- * >2) declare typedef of existing typedef with alphanumeric name, started with Capital letter, same name with fileName, and have no valid export like on point <sup>1</sup> on `options.pahts.file`;
42
- * >3) create `README.md` based on, `options.paths.dir` and `README.src.md`;
43
- * >4) extract `"at"description` jsdoc:
40
+ * >1) add `"at"noautodoc` on self closing jsdoc comment to opt out from generating documentation on said file;
41
+ * >>- auto export must follows the following rules, and there's no way to override;
42
+ * >2) export all named exported 'const'|'function'|'async function'|'class', alphanumeric name, started with Capital letter, same name with fileName on `options.pahts.file`;
43
+ * >3) declare typedef of existing typedef with alphanumeric name, started with Capital letter, same name with fileName, and have no valid export like on point <sup>1</sup> on `options.pahts.file`;
44
+ * >4) create `README.md` based on, `options.paths.dir` and `README.src.md`;
45
+ * >5) extract `"at"description` jsdoc:
44
46
  * >>- on static/prop that have depths, all of children should have `"at"static`/`"at"instance` `nameOfImmediateParent`, same block but before `"at"description` comment line;
45
47
  * >>- `"at"description` are treated as plain `markdown`;
46
48
  * >>- first `"at"${string}` after `"at"description` until `"at"example` will be treated as `javascript` comment block on the `markdown`;
@@ -226,7 +228,7 @@ export class JSautoDOC {
226
228
  * @returns {string}
227
229
  */
228
230
  #generateJSDOCFromstring = (string) => {
229
- return `\n/**\n * automatically generated by \`vivth.MJSautoDOC\`\n * @copyright\n${string.replace(
231
+ return `\n/**\n * automatically generated by \`vivth.JSautoDOC\`\n * @copyright\n${string.replace(
230
232
  /^/gm,
231
233
  ' * '
232
234
  )}\n */\n`;
@@ -250,6 +252,7 @@ export class JSautoDOC {
250
252
  for await (const path_ of filepaths) {
251
253
  const {
252
254
  documented,
255
+ content,
253
256
  hasValidExportObject,
254
257
  path: { relative: relativePath },
255
258
  baseName: { noExt },
@@ -261,6 +264,9 @@ export class JSautoDOC {
261
264
  }';`
262
265
  );
263
266
  }
267
+ if (/\/\*\*[\s\*]*?@noautodoc[\s\*]*?\*\//.test(await content.string())) {
268
+ continue;
269
+ }
264
270
  const currentDescription = [];
265
271
  const { readme, typedef } = documented;
266
272
  const [typedefString, error] = await TryAsync(async () => {
@@ -4,10 +4,12 @@
4
4
  * - this autodocumenter uses [chokidar](https://npmjs.com/package/chokidar) under the hood;
5
5
  * - this class also is used to generate this `README.md`;
6
6
  * - behaviours:
7
- * >1) export all named exported 'const'|'function'|'async function'|'class', alphanumeric name, started with Capital letter, same name with fileName on `options.pahts.file`;
8
- * >2) declare typedef of existing typedef with alphanumeric name, started with Capital letter, same name with fileName, and have no valid export like on point <sup>1</sup> on `options.pahts.file`;
9
- * >3) create `README.md` based on, `options.paths.dir` and `README.src.md`;
10
- * >4) extract `"at"description` jsdoc:
7
+ * >1) add `"at"noautodoc` on self closing jsdoc comment to opt out from generating documentation on said file;
8
+ * >>- auto export must follows the following rules, and there's no way to override;
9
+ * >2) export all named exported 'const'|'function'|'async function'|'class', alphanumeric name, started with Capital letter, same name with fileName on `options.pahts.file`;
10
+ * >3) declare typedef of existing typedef with alphanumeric name, started with Capital letter, same name with fileName, and have no valid export like on point <sup>1</sup> on `options.pahts.file`;
11
+ * >4) create `README.md` based on, `options.paths.dir` and `README.src.md`;
12
+ * >5) extract `"at"description` jsdoc:
11
13
  * >>- on static/prop that have depths, all of children should have `"at"static`/`"at"instance` `nameOfImmediateParent`, same block but before `"at"description` comment line;
12
14
  * >>- `"at"description` are treated as plain `markdown`;
13
15
  * >>- first `"at"${string}` after `"at"description` until `"at"example` will be treated as `javascript` comment block on the `markdown`;