create-claude-workspace 1.1.72 → 1.1.73

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.
@@ -264,22 +264,29 @@ npx themecraft generate # generates type-safe SCSS from tokens.json
264
264
  4. `@themecraft/core/themes` → `variables()` mixin emits CSS custom properties at `:root`
265
265
  5. `@themecraft/angular` → `provideTheme()` for runtime switching, `provideThemeServer()` for SSR (no FOUC)
266
266
 
267
- **Component SCSS** — import generated variables, NEVER call `color-var()`/`size-var()` directly:
267
+ **Component SCSS** — import via package name, NEVER use relative paths, NEVER call `color-var()`/`size-var()` directly:
268
268
  ```scss
269
- @use 'generated/theme/colors' as colors;
270
- @use 'generated/theme/sizes' as sizes;
271
- @use 'generated/theme/typography' as typo;
272
- @use '@themecraft/core/theming' as theming;
269
+ // Import via package name (configured in tsconfig/package.json paths)
270
+ // SCSS @use automatically uses the last path segment as namespace — no `as` needed
271
+ @use 'theme/colors';
272
+ @use 'theme/sizes';
273
+ @use 'theme/typography';
274
+ @use '@themecraft/core/theming';
273
275
 
274
276
  .card {
275
277
  background: colors.$surface;
276
278
  color: colors.$on-surface;
277
279
  padding: sizes.$card-padding;
278
- @include typo.body-primary();
280
+ @include typography.body-primary();
279
281
  @include theming.theme-transition(); // smooth theme switch
280
282
  }
281
283
  ```
282
284
 
285
+ **SCSS import rules:**
286
+ - ALWAYS import via package/library name (e.g. `@use 'theme/colors'`) — configure `stylePreprocessorOptions.includePaths` or tsconfig paths so the theme library is resolvable by name
287
+ - NEVER use relative paths (`../../theme/src/generated/...`) — they break on refactoring and are unreadable
288
+ - NEVER use redundant `as` aliases that match the last path segment (`@use 'theme/colors' as colors` → just `@use 'theme/colors'`). Only use `as` when you need a different name.
289
+
283
290
  **How it works:** `npx themecraft generate` reads `tokens.json` and produces typed SCSS files (`generated/theme/colors.scss`, `sizes.scss`, `typography.scss`) that wrap `color-var()`/`size-var()` internally. Components consume these generated variables — never the raw accessor functions.
284
291
 
285
292
  **Token source (pick one):**
@@ -410,6 +417,7 @@ When reviewing Angular code, check:
410
417
  - Resource disposal (ImageBitmap.close(), stream.stop(), BroadcastChannel.close())
411
418
  - No memory leaks in effects or event listeners
412
419
  - Theme compliance: generated @themecraft SCSS variables — no hardcoded colors/sizes, no direct `color-var()`/`size-var()` calls
420
+ - SCSS imports: via package name (no relative paths), no redundant `as` aliases
413
421
  - Lazy loading via loadComponent/loadChildren, no eager page imports
414
422
  - @defer for heavy below-fold components
415
423
  - Naming: PascalCase components, lib- selectors, kebab-case files
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-claude-workspace",
3
- "version": "1.1.72",
3
+ "version": "1.1.73",
4
4
  "description": "Scaffold a project with Claude Code agents for autonomous AI-driven development",
5
5
  "type": "module",
6
6
  "bin": {