@blueprintui/cli 0.2.1 → 0.4.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 +8 -1
- package/package.json +14 -14
- package/src/custom-elements-manifest.config.mjs +26 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
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
|
|
6
10
|
- bump dependencies
|
|
7
11
|
|
|
8
|
-
## 0.
|
|
12
|
+
## 0.4.0
|
|
13
|
+
- upgrade to TypeScript 5.2.x
|
|
14
|
+
|
|
15
|
+
## 0.3.0
|
|
9
16
|
- bump dependencies
|
|
10
17
|
|
|
11
18
|
## 0.1.3
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blueprintui/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.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.
|
|
18
|
-
"@lit/ts-transformers": "
|
|
19
|
-
"@rollup/plugin-node-resolve": "15.
|
|
17
|
+
"@custom-elements-manifest/analyzer": "0.8.3",
|
|
18
|
+
"@lit/ts-transformers": "2.0.0-pre.1",
|
|
19
|
+
"@rollup/plugin-node-resolve": "15.2.1",
|
|
20
20
|
"@rollup/plugin-replace": "5.0.2",
|
|
21
|
-
"@rollup/plugin-typescript": "11.1.
|
|
21
|
+
"@rollup/plugin-typescript": "11.1.4",
|
|
22
22
|
"@rollup/plugin-virtual": "3.0.1",
|
|
23
23
|
"@skypack/package-check": "0.2.2",
|
|
24
|
-
"acorn-import-assertions": "1.
|
|
25
|
-
"browserslist": "4.21.
|
|
26
|
-
"commander": "
|
|
27
|
-
"
|
|
28
|
-
"
|
|
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.
|
|
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.
|
|
37
|
-
"tslib": "2.
|
|
38
|
-
"typescript": "~
|
|
36
|
+
"terser": "5.18.1",
|
|
37
|
+
"tslib": "2.6.2",
|
|
38
|
+
"typescript": "~5.2.2",
|
|
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,13 +23,13 @@ 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
|
+
function orderElements() {
|
|
33
33
|
return {
|
|
34
34
|
name: 'order-elements',
|
|
35
35
|
packageLinkPhase({ customElementsManifest }) {
|
|
@@ -38,7 +38,7 @@ export function orderElements() {
|
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
function baseDir() {
|
|
42
42
|
return {
|
|
43
43
|
name: 'base-dir',
|
|
44
44
|
packageLinkPhase({ customElementsManifest }) {
|
|
@@ -49,7 +49,7 @@ export function baseDir() {
|
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
function tsExtension() {
|
|
53
53
|
return {
|
|
54
54
|
name: 'ts-extensions',
|
|
55
55
|
packageLinkPhase({ customElementsManifest }) {
|
|
@@ -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
|
+
}
|