@ng-cn/core 1.0.9 → 1.0.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ng-cn/core",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "Beautifully designed Angular components built with Tailwind CSS v4 - The official Angular port of shadcn/ui",
5
5
  "keywords": [
6
6
  "angular",
@@ -103,4 +103,4 @@
103
103
  "typescript": "~5.9.2",
104
104
  "vitest": "^4.0.16"
105
105
  }
106
- }
106
+ }
@@ -712,42 +712,15 @@ function ngAdd(options) {
712
712
  else {
713
713
  context.logger.info('📦 Selected Components');
714
714
  }
715
- const sourceComponentsBase = 'node_modules/@ng-cn/core/src/app/lib/components/ui';
716
- let componentsCopied = 0;
715
+ // For now, just log the components that would be copied
716
+ // Components will be available via 'ng g @ng-cn/core:component <name>'
717
717
  for (const component of componentsToInstall) {
718
- // Convert kebab-case to component folder name
719
- const componentFolder = component.replace(/-/g, '-');
720
- const sourceComponentPath = (0, core_1.join)((0, core_1.normalize)(sourceComponentsBase), (0, core_1.normalize)(componentFolder));
721
- const targetComponentPath = (0, core_1.join)((0, core_1.normalize)(uiPath), (0, core_1.normalize)(componentFolder));
722
- try {
723
- // Try to copy the entire component folder
724
- const sourceFiles = tree.getDir(sourceComponentPath);
725
- if (sourceFiles && sourceFiles.subfiles.length > 0) {
726
- for (const file of sourceFiles.subfiles) {
727
- const sourceFile = sourceComponentPath + '/' + file;
728
- const targetFile = targetComponentPath + '/' + file;
729
- const content = tree.read(sourceFile);
730
- if (content) {
731
- if (tree.exists(targetFile)) {
732
- tree.overwrite(targetFile, content);
733
- }
734
- else {
735
- tree.create(targetFile, content);
736
- }
737
- componentsCopied++;
738
- }
739
- }
740
- context.logger.info(` + ${component}`);
741
- }
742
- }
743
- catch (e) {
744
- // Component folder doesn't exist yet or not available, skip
745
- context.logger.debug(` ⊘ ${component} not available in core package`);
746
- }
747
- }
748
- if (componentsCopied > 0) {
749
- context.logger.info(` ✓ ${componentsCopied} component files copied`);
718
+ context.logger.info(` + ${component} (available via: ng g @ng-cn/core:component ${component})`);
750
719
  }
720
+ context.logger.info('');
721
+ context.logger.info('💡 To copy individual components, use:');
722
+ context.logger.info(` ng g @ng-cn/core:component button`);
723
+ context.logger.info(` ng g @ng-cn/core:component card`);
751
724
  }
752
725
  // Success message with ASCII art banner
753
726
  context.logger.info('');
@@ -779,43 +779,16 @@ export function ngAdd(options: NgAddOptions): Rule {
779
779
  context.logger.info('📦 Selected Components');
780
780
  }
781
781
 
782
- const sourceComponentsBase = 'node_modules/@ng-cn/core/src/app/lib/components/ui';
783
- let componentsCopied = 0;
784
-
782
+ // For now, just log the components that would be copied
783
+ // Components will be available via 'ng g @ng-cn/core:component <name>'
785
784
  for (const component of componentsToInstall) {
786
- // Convert kebab-case to component folder name
787
- const componentFolder = component.replace(/-/g, '-');
788
- const sourceComponentPath = join(normalize(sourceComponentsBase), normalize(componentFolder)) as Path;
789
- const targetComponentPath = join(normalize(uiPath), normalize(componentFolder)) as Path;
790
-
791
- try {
792
- // Try to copy the entire component folder
793
- const sourceFiles = tree.getDir(sourceComponentPath);
794
- if (sourceFiles && sourceFiles.subfiles.length > 0) {
795
- for (const file of sourceFiles.subfiles) {
796
- const sourceFile = sourceComponentPath + '/' + file;
797
- const targetFile = targetComponentPath + '/' + file;
798
- const content = tree.read(sourceFile as Path);
799
- if (content) {
800
- if (tree.exists(targetFile as Path)) {
801
- tree.overwrite(targetFile as Path, content);
802
- } else {
803
- tree.create(targetFile as Path, content);
804
- }
805
- componentsCopied++;
806
- }
807
- }
808
- context.logger.info(` + ${component}`);
809
- }
810
- } catch (e) {
811
- // Component folder doesn't exist yet or not available, skip
812
- context.logger.debug(` ⊘ ${component} not available in core package`);
813
- }
785
+ context.logger.info(` + ${component} (available via: ng g @ng-cn/core:component ${component})`);
814
786
  }
815
787
 
816
- if (componentsCopied > 0) {
817
- context.logger.info(` ✓ ${componentsCopied} component files copied`);
818
- }
788
+ context.logger.info('');
789
+ context.logger.info('💡 To copy individual components, use:');
790
+ context.logger.info(` ng g @ng-cn/core:component button`);
791
+ context.logger.info(` ng g @ng-cn/core:component card`);
819
792
  }
820
793
 
821
794
  // Success message with ASCII art banner