Skip to content

Commit 5c63566

Browse files
committed
chore(docs): add design md file
- Create DESIGN.md with structured content for design tokens and guidelines. - Update .vale.ini to include DESIGN.md for style checks. - Modify package.json and pnpm-workspace.yaml to include design project paths. - Implement build scripts and ESLint configuration for the design project. - Enhance site navigation and metadata to link to DESIGN.md. Signed-off-by: Cory Rylan <crylan@nvidia.com>
1 parent 3fcca0d commit 5c63566

21 files changed

Lines changed: 1567 additions & 3 deletions

‎.vale.ini‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ Elements.SummaryImplementation = NO
2121
[NOTICE.md]
2222
BasedOnStyles =
2323

24+
[DESIGN.md]
25+
BasedOnStyles =
26+
2427
[**/NOTICE.md]
2528
BasedOnStyles =
2629

‎DESIGN.md‎

Lines changed: 269 additions & 0 deletions
Large diffs are not rendered by default.

‎README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ NVIDIA Design System and UI Agent Harness for AI/ML Factories, Robotics, and Aut
1313
-[Contribution Guidelines](https://NVIDIA.github.io/elements/docs/about/contributions/)
1414
-[Feature request](https://github.com/NVIDIA/elements/issues/new?issuable_template=feature)
1515
-[Bug report](https://github.com/NVIDIA/elements/issues/new?issuable_template=default)
16+
-[Official NVIDIA Elements DESIGN.md](https://NVIDIA.github.io/elements/docs/design-md/)
1617

1718
## Organization
1819

‎package.json‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@
102102
"./projects/starters/vue:ci",
103103
"./projects/styles:ci",
104104
"./projects/themes:ci",
105+
"./projects/internals/design:ci",
105106
"./projects/internals/metadata:ci",
106107
"./projects/internals/patterns:ci",
107108
"./projects/internals/testing:ci",
@@ -262,6 +263,7 @@
262263
"./projects/create:lint:fix",
263264
"./projects/core:lint:fix",
264265
"./projects/forms:lint:fix",
266+
"./projects/internals/design:lint:fix",
265267
"./projects/internals/metadata:lint:fix",
266268
"./projects/internals/patterns:lint:fix",
267269
"./projects/internals/testing:lint:fix",

‎pnpm-lock.yaml‎

Lines changed: 732 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pnpm-workspace.yaml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ packages:
3333
- projects/forms
3434
- projects/styles
3535
- projects/themes
36+
- projects/internals/design
3637
- projects/internals/eslint
3738
- projects/internals/metadata
3839
- projects/internals/patterns
@@ -126,6 +127,7 @@ minimumReleaseAgeExclude:
126127
- publint
127128
- typescript
128129
- vite
130+
- '@google/design.md@0.4.0'
129131

130132
allowBuilds:
131133
'@modelcontextprotocol/ext-apps': true
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Elements design artifacts
2+
3+
This private workspace project owns build-time design analysis and generated artifacts that describe the NVIDIA Elements design system as a whole.
4+
5+
## DESIGN.md
6+
7+
`src/design-md.js` resolves maintained Elements theme tokens and combines them with reviewed design and component guidance. The build writes the result to `dist/DESIGN.md`.
8+
9+
Run `pnpm build` to generate the internal artifact. Run `pnpm sync:root` when an intentional generator change should update the checked-in `DESIGN.md` at the repository root.
10+
11+
Tests verify that the built and repository artifacts match the generator. The site consumes the built artifact and publishes it at `/DESIGN.md`.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import{nodeJavaScriptConfig}from'@internals/eslint';
2+
3+
/** @type {import('eslint').Linter.Config[]} */
4+
exportdefault[
5+
...nodeJavaScriptConfig,
6+
{
7+
files: ['src/design-md.js'],
8+
rules: {
9+
'max-lines': 'off',
10+
'max-lines-per-function': 'off'
11+
}
12+
}
13+
];
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
{
2+
"name": "@internals/design",
3+
"version": "0.0.0",
4+
"private": true,
5+
"description": "Build-time analysis and generated design artifacts for NVIDIA Elements.",
6+
"type": "module",
7+
"scripts": {
8+
"ci": "wireit",
9+
"build": "wireit",
10+
"sync:root": "wireit",
11+
"lint": "wireit",
12+
"lint:fix": "wireit",
13+
"test": "wireit",
14+
"test:spec": "wireit"
15+
},
16+
"exports": {
17+
"./DESIGN.md": "./dist/DESIGN.md"
18+
},
19+
"devDependencies": {
20+
"@google/design.md": "0.4.0",
21+
"@internals/eslint": "workspace:*",
22+
"@nvidia-elements/themes": "workspace:*",
23+
"eslint": "catalog:",
24+
"vitest": "catalog:"
25+
},
26+
"wireit": {
27+
"ci": {
28+
"dependencies": [
29+
"lint",
30+
"test"
31+
]
32+
},
33+
"build": {
34+
"command": "node ./scripts/write-design-md.js dist/DESIGN.md",
35+
"files": [
36+
"src/design-md.js",
37+
"scripts/write-design-md.js",
38+
"../../themes/dist/index.json",
39+
"package.json"
40+
],
41+
"output": [
42+
"dist/DESIGN.md"
43+
],
44+
"dependencies": [
45+
{
46+
"script": "../../themes:build",
47+
"cascade": false
48+
}
49+
]
50+
},
51+
"sync:root": {
52+
"command": "node ./scripts/write-design-md.js ../../../DESIGN.md",
53+
"files": [
54+
"src/design-md.js",
55+
"../../themes/dist/index.json"
56+
],
57+
"output": [
58+
"./dist/DESIGN.md"
59+
],
60+
"dependencies": [
61+
"build"
62+
]
63+
},
64+
"lint": {
65+
"command": "eslint -c ./eslint.config.js --color --cache --cache-location .eslintcache/",
66+
"files": [
67+
"src/**/*.js",
68+
"src/**/*.ts",
69+
"scripts/**/*.js",
70+
"eslint.config.js"
71+
],
72+
"output": [],
73+
"dependencies": [
74+
"../eslint:ci"
75+
]
76+
},
77+
"lint:fix": {
78+
"command": "eslint -c ./eslint.config.js --fix",
79+
"dependencies": [
80+
"../eslint:ci"
81+
]
82+
},
83+
"test": {
84+
"command": "vitest run",
85+
"files": [
86+
"dist/DESIGN.md",
87+
"src/**/*.test.js"
88+
],
89+
"output": [],
90+
"dependencies": [
91+
"build",
92+
"test:spec"
93+
]
94+
},
95+
"test:spec": {
96+
"command": "designmd lint dist/DESIGN.md",
97+
"files": [
98+
"dist/DESIGN.md"
99+
],
100+
"output": [],
101+
"dependencies": [
102+
"build"
103+
]
104+
}
105+
}
106+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import{promisesasfsp}from'node:fs';
2+
importnodePathfrom'node:path';
3+
import{createDesignMdContent}from'../src/design-md.js';
4+
5+
constoutputPath=nodePath.resolve(process.argv[2]??'dist/DESIGN.md');
6+
7+
awaitfsp.mkdir(nodePath.dirname(outputPath),{recursive: true});
8+
awaitfsp.writeFile(outputPath,createDesignMdContent(),'utf-8');

0 commit comments

Comments
 (0)