aplance-ui 1.2.0 → 1.2.1

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/dist/api.d.ts CHANGED
@@ -143,6 +143,8 @@ interface InitCommandOptions {
143
143
  components?: string[];
144
144
  /** Copy every unit in the registry (library mode). Overrides `components` when true. */
145
145
  all?: boolean;
146
+ /** Scaffold styles + tokens + postcss config + components.json only. No components/hooks/libs. */
147
+ skipComponents?: boolean;
146
148
  /**
147
149
  * Auto-install runtime + dev dependencies after scaffolding. `true` by default.
148
150
  * When unset and `yes` is false, the CLI prompts for confirmation.
package/dist/api.js CHANGED
@@ -1662,6 +1662,7 @@ var resolveConfig = async (opts, project, registry) => {
1662
1662
  return { cfg, existed: false };
1663
1663
  };
1664
1664
  var pickInitialComponents = async (opts, registry) => {
1665
+ if (opts.skipComponents) return [];
1665
1666
  if (opts.all) return registry.units.map((u) => u.name);
1666
1667
  if (opts.components && opts.components.length > 0) return opts.components;
1667
1668
  if (opts.yes) return [];
@@ -1678,6 +1679,9 @@ var pickInitialComponents = async (opts, registry) => {
1678
1679
  });
1679
1680
  };
1680
1681
  var runInit = async (opts) => {
1682
+ if (opts.skipComponents && (opts.all || opts.components && opts.components.length > 0)) {
1683
+ throw new Error("error: --skip-components cannot be combined with --all or --components");
1684
+ }
1681
1685
  headline("Scaffold tokens, theme, PostCSS, and optionally copy components.");
1682
1686
  const registry = loadRegistry();
1683
1687
  const project = detectProject(opts.cwd);