Skip to content

Commit d9630e3

Browse files
committed
chore: cleanup
1 parent e73873e commit d9630e3

File tree

3 files changed

+18
-62
lines changed

3 files changed

+18
-62
lines changed

packages/analyzer/custom-elements.json

Lines changed: 4 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -7,64 +7,16 @@
77
"path": "fixtures/-default/package/bar.js",
88
"declarations": [
99
{
10-
"kind": "class",
11-
"description": "",
12-
"name": "default",
13-
"cssParts": [
14-
{
15-
"name": "foo"
16-
}
17-
],
18-
"members": [
19-
{
20-
"kind": "field",
21-
"name": "propertyDecorator",
22-
"type": {
23-
"text": "string"
24-
},
25-
"default": "hi"
26-
},
27-
{
28-
"kind": "field",
29-
"name": "mobileopen",
30-
"privacy": "public",
31-
"default": "false"
32-
}
33-
],
34-
"attributes": [
35-
{
36-
"name": "propertyDecorator",
37-
"type": {
38-
"text": "string"
39-
},
40-
"default": "hi",
41-
"fieldName": "propertyDecorator"
42-
},
43-
{
44-
"name": "mobileopen",
45-
"fieldName": "mobileopen"
46-
}
47-
],
48-
"superclass": {
49-
"name": "LitElement"
50-
},
51-
"customElement": true
10+
"kind": "function",
11+
"name": "bar"
5212
}
5313
],
5414
"exports": [
5515
{
5616
"kind": "js",
57-
"name": "default",
58-
"declaration": {
59-
"name": "default",
60-
"module": "fixtures/-default/package/bar.js"
61-
}
62-
},
63-
{
64-
"kind": "custom-element-definition",
65-
"name": "top-bar",
17+
"name": "bar",
6618
"declaration": {
67-
"name": "TopBar",
19+
"name": "bar",
6820
"module": "fixtures/-default/package/bar.js"
6921
}
7022
}

packages/analyzer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@custom-elements-manifest/analyzer",
3-
"version": "0.2.4",
3+
"version": "0.3.0",
44
"description": "",
55
"license": "MIT",
66
"type": "module",

packages/analyzer/src/utils/cli.js

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { readConfig, ConfigLoaderError } from '@web/config-loader';
22
import fs from 'fs';
3+
import path from 'path';
34
import commandLineArgs from 'command-line-args';
45
import { has } from './index.js';
56

@@ -90,7 +91,7 @@ export function timestamp() {
9091
}
9192

9293
export function addCustomElementsPropertyToPackageJson() {
93-
const packageJsonPath = `${process.cwd()}/package.json`;
94+
const packageJsonPath = `${process.cwd()}${path.sep}package.json`;
9495
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath).toString());
9596

9697
if(packageJson?.customElements) {
@@ -105,14 +106,17 @@ export const MENU = `
105106
@custom-elements-manifest/analyzer
106107
107108
Available commands:
108-
| Command/option | Type | Description | Example |
109-
| ---------------- | ---------- | ---------------------------------------------------- | --------------------- |
110-
| analyze | | Analyze your components | |
111-
| --globs | string[] | Globs to analyze | \`--globs "foo.js"\` |
112-
| --exclude | string[] | Globs to exclude | \`--exclude "foo.js"\` |
113-
| --litelement | boolean | Enable special handling for LitElement syntax | \`--litelement\` |
114-
| --stencil | boolean | Enable special handling for Stencil syntax | \`--stencil\` |
115-
| --catalyst | boolean | Enable special handling for Catalyst syntax | \`--catalyst\` |
109+
| Command/option | Type | Description | Example |
110+
| ---------------- | ---------- | ----------------------------------------------------------- | --------------------- |
111+
| analyze | | Analyze your components | |
112+
| --globs | string[] | Globs to analyze | \`--globs "foo.js"\` |
113+
| --exclude | string[] | Globs to exclude | \`--exclude "foo.js"\` |
114+
| --watch | boolean | Enables watch mode, generates a new manifest on file change | \`--watch\` |
115+
| --dev | boolean | Enables extra logging for debugging | \`--dev\` |
116+
| --litelement | boolean | Enable special handling for LitElement syntax | \`--litelement\` |
117+
| --fast | boolean | Enable special handling for FASTElement syntax | \`--fast\` |
118+
| --stencil | boolean | Enable special handling for Stencil syntax | \`--stencil\` |
119+
| --catalyst | boolean | Enable special handling for Catalyst syntax | \`--catalyst\` |
116120
117121
Example:
118122
custom-elements-manifest analyze --litelement --globs "**/*.js" --exclude "foo.js" "bar.js"

0 commit comments

Comments
 (0)