Skip to content
This repository was archived by the owner on Nov 13, 2025. It is now read-only.

Commit 1235045

Browse files
committed
Add elements manifest
1 parent c31e1b9 commit 1235045

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+12846
-20170
lines changed

.changeset/neat-carpets-applaud.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@crowdstrike/glide-core': patch
3+
---
4+
5+
Each component now includes a JSDoc comment at the top with its attributes, slots, custom properties, events, properties, and methods,

custom-elements.config.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// The analyzer expects plugins to be JavaScript. But writing plugins in
2+
// JavaScript is unruly and error prone. So they're written in TypeScript,
3+
// then compiled and imported as JavaScript.
4+
import addCustomProperties from './dist/cem-analyzer-plugins/add-custom-properties.js';
5+
import addEvents from './dist/cem-analyzer-plugins/add-events.js';
6+
import addRequired from './dist/cem-analyzer-plugins/add-required.js';
7+
import addSlots from './dist/cem-analyzer-plugins/add-slots.js';
8+
import modifyVersionAttribute from './dist/cem-analyzer-plugins/modify-version-attribute.js';
9+
import removeBlockComments from './dist/cem-analyzer-plugins/remove-block-comments.js';
10+
11+
export default {
12+
exclude: [
13+
'./src/**/*stories*',
14+
'./src/**/*test*',
15+
'./src/cem-analzyer-plugins/**',
16+
'./src/eslint/**',
17+
'./src/icons/**',
18+
'./src/library/**',
19+
'./src/stylelint/**',
20+
'./src/styles/**',
21+
'./src/translations/**',
22+
'./src/ts-morph/**',
23+
],
24+
globs: ['./src/*.ts'],
25+
litelement: true,
26+
plugins: [
27+
removeBlockComments(),
28+
addCustomProperties(),
29+
addEvents(),
30+
addRequired(),
31+
addSlots(),
32+
modifyVersionAttribute(),
33+
],
34+
};

custom-elements.json

Lines changed: 10990 additions & 20003 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,19 @@
4343
"scripts": {
4444
"start": "per-env",
4545
"start:development": "npm-run-all --parallel --print-name start:development:*",
46+
"start:development:cem-analyze": "chokidar ./custom-elements.config.js './src/*.ts' './src/*.*.ts' './src/cem-analyzer-plugins/**' --ignore '**/*stories*' --ignore '**/*test*' --initial --silent --command 'tsc --noCheck --outDir ./dist && NODE_OPTIONS=--no-warnings=ExperimentalWarning cem analyze --config ./custom-elements.config.js --quiet'",
47+
"start:development:cem-analyze:comment": "JSON module imports produce a warning. Remove NODE_OPTIONS when JSON module imports are no longer experimental.",
4648
"start:development:storybook": "storybook dev --config-dir .storybook --no-open --no-version-updates --port 6006",
49+
"start:development:ts-morph": "chokidar './src/ts-morph/**' --initial --silent --command 'tsx ./src/ts-morph/run.ts'",
50+
"start:development:ts-morph:comment:tsx": "Remove `tsx` once Node.js type stripping is available.",
51+
"start:development:ts-morph:comment:watching": "It would be helpful to also watch './custom-elements.json`. But doing so would create a loop between this script and `start:development:cem-analyze`.",
4752
"start:production": "rimraf ./dist && npm-run-all --aggregate-output --print-label --parallel start:production:components start:production:storybook start:production:stylesheets",
4853
"start:production:components": "tsc --noCheck --outDir ./dist && node ./terser.js",
4954
"start:production:figma": "pnpm dt export-variables && pnpm dt build-tokens && pnpm dt build-styles",
55+
"start:production:cem-analyze": "tsc --noCheck --outDir ./dist && NODE_OPTIONS=--no-warnings=ExperimentalWarning cem analyze --config ./custom-elements.config.js --quiet && git diff --quiet -- || { echo ERROR: Uncommitted elements manifest changes. Run this command locally and commit the changes.; exit 1; }",
5056
"start:production:storybook": "storybook build --config-dir .storybook --disable-telemetry --output-dir ./dist/storybook",
5157
"start:production:stylesheets": "node ./esbuild.js",
58+
"start:production:ts-morph": "tsx ./src/ts-morph/run.ts && git diff --quiet -- || { echo ERROR: Uncommitted code modifications. Run this command locally and commit the changes.; exit 1; }",
5259
"format": "per-env",
5360
"format:development": "chokidar '**/*' --ignore 'dist/**' --ignore '.changeset/**' --ignore '.git/**' --ignore 'node_modules/**' --ignore 'pnpm-lock.yaml' --initial --silent --comand 'prettier --write --ignore-unknown {path} && stylelint {path}'",
5461
"format:production": "prettier . --debug-check",
@@ -89,6 +96,7 @@
8996
"@changesets/changelog-github": "^0.5.0",
9097
"@changesets/cli": "^2.27.10",
9198
"@crowdstrike/design-tokens": "^2.0.1",
99+
"@custom-elements-manifest/analyzer": "^0.10.4",
92100
"@eslint/eslintrc": "^3.2.0",
93101
"@eslint/js": "^9.17.0",
94102
"@open-wc/testing": "^4.0.0",
@@ -118,6 +126,7 @@
118126
"chalk": "^5.3.0",
119127
"chokidar-cli": "^3.0.0",
120128
"comment-parser": "^1.4.1",
129+
"custom-elements-manifest": "^2.1.0",
121130
"esbuild": "^0.25.0",
122131
"eslint": "^9.17.0",
123132
"eslint-config-prettier": "^10.0.1",
@@ -152,6 +161,8 @@
152161
"stylelint-use-nesting": "^6.0.0",
153162
"terser": "^5.37.0",
154163
"ts-lit-plugin": "^2.0.2",
164+
"ts-morph": "^25.0.1",
165+
"tsx": "^4.19.2",
155166
"typescript": "^5.7.2",
156167
"typescript-eslint": "^8.23.0",
157168
"vite": "^6.0.7",

0 commit comments

Comments
 (0)