@blueprintui/cli 0.2.1 → 0.3.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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ # 0.3.0
4
+ - support for jsdoc tagging in custom-elements.json metadata
5
+ - bump dependencies
6
+
3
7
  # 0.2.1
4
8
  - update CSS optimization to use lightningcss
5
9
  - remove legacy Safari compatibility optimizations
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blueprintui/cli",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "description": "",
5
5
  "main": "./index.mjs",
6
6
  "bin": {
@@ -14,28 +14,28 @@
14
14
  "author": "Crylan Software",
15
15
  "license": "MIT",
16
16
  "dependencies": {
17
- "@custom-elements-manifest/analyzer": "0.8.1",
18
- "@lit/ts-transformers": "1.1.3",
19
- "@rollup/plugin-node-resolve": "15.0.2",
17
+ "@custom-elements-manifest/analyzer": "0.8.3",
18
+ "@lit/ts-transformers": "2.0.0-pre.0",
19
+ "@rollup/plugin-node-resolve": "15.1.0",
20
20
  "@rollup/plugin-replace": "5.0.2",
21
- "@rollup/plugin-typescript": "11.1.0",
21
+ "@rollup/plugin-typescript": "11.1.1",
22
22
  "@rollup/plugin-virtual": "3.0.1",
23
23
  "@skypack/package-check": "0.2.2",
24
- "acorn-import-assertions": "1.8.0",
25
- "browserslist": "4.21.5",
26
- "commander": "10.0.1",
27
- "lightningcss": "1.20.0",
28
- "glob": "10.2.2",
24
+ "acorn-import-assertions": "1.9.0",
25
+ "browserslist": "4.21.9",
26
+ "commander": "11.0.0",
27
+ "glob": "10.3.0",
28
+ "lightningcss": "1.21.0",
29
29
  "minify-html-literals": "1.3.5",
30
30
  "path": "0.12.7",
31
- "rollup": "3.21.5",
31
+ "rollup": "3.25.2",
32
32
  "rollup-plugin-copy": "3.4.0",
33
33
  "rollup-plugin-delete": "2.0.0",
34
34
  "rollup-plugin-import-assert": "3.0.1",
35
35
  "rollup-plugin-shell": "1.0.9",
36
- "terser": "5.17.1",
36
+ "terser": "5.18.1",
37
37
  "tslib": "2.5.0",
38
- "typescript": "~4.7.4",
38
+ "typescript": "~5.0.4",
39
39
  "zx": "7.2.2"
40
40
  },
41
41
  "devDependencies": {
@@ -3,7 +3,7 @@ import { resolve } from 'path';
3
3
  const cwd = process.cwd();
4
4
  const baseSrc = resolve(cwd, 'src');
5
5
 
6
- let userConfig = { };
6
+ let userConfig = {};
7
7
  if (process.env.BLUEPRINTUI_CONFIG) {
8
8
  userConfig = await import(process.env.BLUEPRINTUI_CONFIG);
9
9
  }
@@ -23,10 +23,10 @@ export default {
23
23
  `${resolve(cwd, config.baseDir)}/**/*.performance.ts`,
24
24
  `${resolve(cwd, config.baseDir)}/**/*.stories.ts`,
25
25
  `${resolve(cwd, config.baseDir)}/**/*.examples.js`
26
- ],
26
+ ],
27
27
  outdir: config.outDir,
28
28
  litelement: true,
29
- plugins: [tsExtension(), baseDir(), orderElements()],
29
+ plugins: [tsExtension(), baseDir(), orderElements(), metadata({ tags: ['docs', 'spec', 'status'] })],
30
30
  };
31
31
 
32
32
  export function orderElements() {
@@ -57,3 +57,23 @@ export function tsExtension() {
57
57
  },
58
58
  };
59
59
  }
60
+
61
+ function metadata(config = { tags: [] }) {
62
+ return {
63
+ analyzePhase({ ts, node, moduleDoc }) {
64
+ switch (node.kind) {
65
+ case ts.SyntaxKind.ClassDeclaration:
66
+ node.jsDoc?.filter(i => i.tags).forEach(jsDoc => {
67
+ const declaration = moduleDoc.declarations.find(d => d.name === node.name?.getText());
68
+ jsDoc.tags
69
+ .filter(tag => config.tags.find(t => t === tag.tagName?.getText()))
70
+ .forEach(tag => {
71
+ declaration.metadata = { ...declaration.metadata, [tag.tagName?.getText()]: tag.comment };
72
+ });
73
+ });
74
+
75
+ break;
76
+ }
77
+ }
78
+ }
79
+ }