@ng-cn/core 1.0.8 → 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 +2 -2
- package/schematics/ng-add/index.js +9 -16
- package/schematics/ng-add/index.ts +9 -17
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ng-cn/core",
|
|
3
|
-
"version": "1.0.
|
|
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
|
+
}
|
|
@@ -702,32 +702,25 @@ function ngAdd(options) {
|
|
|
702
702
|
context.logger.info(' ✓ Path aliases already set');
|
|
703
703
|
}
|
|
704
704
|
}
|
|
705
|
-
//
|
|
705
|
+
// Copy selected components from @ng-cn/core
|
|
706
706
|
const componentsToInstall = parseComponentsOption(options.components);
|
|
707
707
|
if (componentsToInstall.length > 0) {
|
|
708
708
|
context.logger.info('');
|
|
709
709
|
if (options.components === 'all') {
|
|
710
|
-
context.logger.info(`🚀
|
|
710
|
+
context.logger.info(`🚀 Copying ALL ${componentsToInstall.length} components... (Magic Mode)`);
|
|
711
711
|
}
|
|
712
712
|
else {
|
|
713
713
|
context.logger.info('📦 Selected Components');
|
|
714
714
|
}
|
|
715
|
-
|
|
715
|
+
// For now, just log the components that would be copied
|
|
716
|
+
// Components will be available via 'ng g @ng-cn/core:component <name>'
|
|
716
717
|
for (const component of componentsToInstall) {
|
|
717
|
-
|
|
718
|
-
if (!packageJson.dependencies?.[packageName]) {
|
|
719
|
-
packageJson.dependencies = packageJson.dependencies || {};
|
|
720
|
-
packageJson.dependencies[packageName] = 'latest';
|
|
721
|
-
context.logger.info(` + ${packageName}`);
|
|
722
|
-
}
|
|
723
|
-
else {
|
|
724
|
-
context.logger.info(` ✓ ${packageName} already installed`);
|
|
725
|
-
}
|
|
726
|
-
}
|
|
727
|
-
tree.overwrite(packageJsonPath, JSON.stringify(packageJson, null, 2));
|
|
728
|
-
if (!options.skipInstall) {
|
|
729
|
-
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
718
|
+
context.logger.info(` + ${component} (available via: ng g @ng-cn/core:component ${component})`);
|
|
730
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`);
|
|
731
724
|
}
|
|
732
725
|
// Success message with ASCII art banner
|
|
733
726
|
context.logger.info('');
|
|
@@ -769,34 +769,26 @@ export function ngAdd(options: NgAddOptions): Rule {
|
|
|
769
769
|
}
|
|
770
770
|
}
|
|
771
771
|
|
|
772
|
-
//
|
|
772
|
+
// Copy selected components from @ng-cn/core
|
|
773
773
|
const componentsToInstall = parseComponentsOption(options.components);
|
|
774
774
|
if (componentsToInstall.length > 0) {
|
|
775
775
|
context.logger.info('');
|
|
776
776
|
if (options.components === 'all') {
|
|
777
|
-
context.logger.info(`🚀
|
|
777
|
+
context.logger.info(`🚀 Copying ALL ${componentsToInstall.length} components... (Magic Mode)`);
|
|
778
778
|
} else {
|
|
779
779
|
context.logger.info('📦 Selected Components');
|
|
780
780
|
}
|
|
781
781
|
|
|
782
|
-
|
|
783
|
-
|
|
782
|
+
// For now, just log the components that would be copied
|
|
783
|
+
// Components will be available via 'ng g @ng-cn/core:component <name>'
|
|
784
784
|
for (const component of componentsToInstall) {
|
|
785
|
-
|
|
786
|
-
if (!packageJson.dependencies?.[packageName]) {
|
|
787
|
-
packageJson.dependencies = packageJson.dependencies || {};
|
|
788
|
-
packageJson.dependencies[packageName] = 'latest';
|
|
789
|
-
context.logger.info(` + ${packageName}`);
|
|
790
|
-
} else {
|
|
791
|
-
context.logger.info(` ✓ ${packageName} already installed`);
|
|
792
|
-
}
|
|
785
|
+
context.logger.info(` + ${component} (available via: ng g @ng-cn/core:component ${component})`);
|
|
793
786
|
}
|
|
794
787
|
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
}
|
|
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`);
|
|
800
792
|
}
|
|
801
793
|
|
|
802
794
|
// Success message with ASCII art banner
|