@nghitrum/dsforge 0.1.5-alpha.3 → 0.1.5-alpha.5

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/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  Your design tokens live in Figma. Your components drift from the spec. Your docs are six sprints out of date. dsforge fixes all three with one config file.
6
6
 
7
- <video src="https://github.com/user-attachments/assets/727fcfe2-9814-49e6-9160-29b8b6590b6a" autoplay loop muted playsinline></video>
7
+ <video src="https://github.com/user-attachments/assets/1f4b563e-9217-4636-a265-702ccd93ba25" autoplay loop muted playsinline></video>
8
8
 
9
9
  ## Before / After
10
10
 
package/dist/cli/index.js CHANGED
@@ -4761,6 +4761,9 @@ async function runGenerate(cwd, options) {
4761
4761
  options.debug ?? false
4762
4762
  );
4763
4763
  }
4764
+ const fullRules = Object.fromEntries(
4765
+ REACT_COMPONENTS.map((name) => [name, rules[name] ?? {}])
4766
+ );
4764
4767
  logger.step("Running pre-flight validation...");
4765
4768
  const validation = validateConfig(config, rules);
4766
4769
  const errors = validation.issues.filter((i) => i.severity === "error");
@@ -4856,7 +4859,7 @@ async function runGenerate(cwd, options) {
4856
4859
  logger.step("Writing AI metadata...");
4857
4860
  const metaDir = path3.join(outRoot, "metadata");
4858
4861
  await ensureDir(metaDir);
4859
- const metaFiles = generateMetadata(config, rules, tokenCount);
4862
+ const metaFiles = generateMetadata(config, fullRules, tokenCount);
4860
4863
  for (const { filename, content } of metaFiles) {
4861
4864
  await writeFile(path3.join(metaDir, filename), content);
4862
4865
  logger.dim(` \u2192 metadata/${filename}`);
@@ -4867,7 +4870,7 @@ async function runGenerate(cwd, options) {
4867
4870
  logger.step("Generating docs...");
4868
4871
  const docsDir = path3.join(outRoot, "docs");
4869
4872
  await ensureDir(docsDir);
4870
- const metadataFiles = generateMetadata(config, rules, tokenCount);
4873
+ const metadataFiles = generateMetadata(config, fullRules, tokenCount);
4871
4874
  const metadataMap = {};
4872
4875
  for (const { filename, content } of metadataFiles) {
4873
4876
  const name = filename.replace(".json", "");
@@ -4877,7 +4880,7 @@ async function runGenerate(cwd, options) {
4877
4880
  );
4878
4881
  }
4879
4882
  }
4880
- const docFiles = reactAdapter.generateDocs(config, rules, metadataMap);
4883
+ const docFiles = reactAdapter.generateDocs(config, fullRules, metadataMap);
4881
4884
  for (const { filename, content } of docFiles) {
4882
4885
  await writeFile(path3.join(docsDir, filename), content);
4883
4886
  logger.dim(` \u2192 docs/${filename}`);
@@ -4886,7 +4889,7 @@ async function runGenerate(cwd, options) {
4886
4889
  }
4887
4890
  if (!only) {
4888
4891
  logger.step("Writing package files...");
4889
- const componentNames = Object.keys(rules);
4892
+ const componentNames = Object.keys(fullRules);
4890
4893
  const { filename: pkgFile, content: pkgContent } = reactAdapter.generatePackageManifest(config, componentNames);
4891
4894
  await writeFile(path3.join(outRoot, pkgFile), pkgContent);
4892
4895
  logger.dim(` \u2192 ${pkgFile}`);
@@ -5296,7 +5299,7 @@ async function runMenu() {
5296
5299
  // package.json
5297
5300
  var package_default = {
5298
5301
  name: "@nghitrum/dsforge",
5299
- version: "0.1.5-alpha.3",
5302
+ version: "0.1.5-alpha.5",
5300
5303
  description: "AI-native design system generator \u2014 tokens \u2192 components \u2192 docs \u2192 npm",
5301
5304
  keywords: [
5302
5305
  "design-system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nghitrum/dsforge",
3
- "version": "0.1.5-alpha.3",
3
+ "version": "0.1.5-alpha.5",
4
4
  "description": "AI-native design system generator — tokens → components → docs → npm",
5
5
  "keywords": [
6
6
  "design-system",