diff --git a/common.props b/common.props
index 291a64e0b0..bbb6e34805 100644
--- a/common.props
+++ b/common.props
@@ -29,6 +29,8 @@
true
content\
+
+
true
diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/ProjectNpmPackageAdder.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/ProjectNpmPackageAdder.cs
index f16435ad10..d3d2c834ab 100644
--- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/ProjectNpmPackageAdder.cs
+++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/ProjectNpmPackageAdder.cs
@@ -147,6 +147,34 @@ public class ProjectNpmPackageAdder : ITransientDependency
}
}
+ public async Task RemoveMvcPackageAsync(string directory, NpmPackageInfo npmPackage,
+ bool skipInstallingLibs = false)
+ {
+ var packageJsonFilePath = Path.Combine(directory, "package.json");
+ if (!File.Exists(packageJsonFilePath) ||
+ !File.ReadAllText(packageJsonFilePath).Contains($"\"{npmPackage.Name}\""))
+ {
+ return;
+ }
+
+ Logger.LogInformation($"Removing '{npmPackage.Name}' package from the project '{packageJsonFilePath}'...");
+
+
+ using (DirectoryHelper.ChangeCurrentDirectory(directory))
+ {
+ Logger.LogInformation("yarn remove " + npmPackage.Name);
+ CmdHelper.RunCmd("yarn remove " + npmPackage.Name);
+
+ if (skipInstallingLibs)
+ {
+ return;
+ }
+
+ Logger.LogInformation("Installing client-side packages...");
+ await InstallLibsService.InstallLibsAsync(directory);
+ }
+ }
+
private string DetectAbpVersionOrNull(string packageJsonFile)
{
if (string.IsNullOrEmpty(packageJsonFile) ||
diff --git a/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.abppkg b/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.abppkg
index 930c4018b3..8e2d30d272 100644
--- a/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.abppkg
+++ b/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.abppkg
@@ -1,3 +1,8 @@
{
- "role": "lib.mvc"
+ "role": "lib.mvc",
+ "npmDependencies": {
+ "@abp/blogging": {
+ "version": ""
+ }
+ }
}
\ No newline at end of file
diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Volo.CmsKit.Admin.Web.abppkg b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Volo.CmsKit.Admin.Web.abppkg
index 930c4018b3..33a45483d7 100644
--- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Volo.CmsKit.Admin.Web.abppkg
+++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Volo.CmsKit.Admin.Web.abppkg
@@ -1,3 +1,8 @@
{
- "role": "lib.mvc"
+ "role": "lib.mvc",
+ "npmDependencies": {
+ "@abp/cms-kit.admin": {
+ "version": ""
+ }
+ }
}
\ No newline at end of file
diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Volo.CmsKit.Public.Web.abppkg b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Volo.CmsKit.Public.Web.abppkg
index 930c4018b3..1fe9750915 100644
--- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Volo.CmsKit.Public.Web.abppkg
+++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Volo.CmsKit.Public.Web.abppkg
@@ -1,3 +1,8 @@
{
- "role": "lib.mvc"
+ "role": "lib.mvc",
+ "npmDependencies": {
+ "@abp/cms-kit.public": {
+ "version": ""
+ }
+ }
}
\ No newline at end of file
diff --git a/modules/cms-kit/src/Volo.CmsKit.Web/Volo.CmsKit.Web.abppkg b/modules/cms-kit/src/Volo.CmsKit.Web/Volo.CmsKit.Web.abppkg
index 930c4018b3..4e7da6d7d7 100644
--- a/modules/cms-kit/src/Volo.CmsKit.Web/Volo.CmsKit.Web.abppkg
+++ b/modules/cms-kit/src/Volo.CmsKit.Web/Volo.CmsKit.Web.abppkg
@@ -1,3 +1,8 @@
{
- "role": "lib.mvc"
+ "role": "lib.mvc",
+ "npmDependencies": {
+ "@abp/cms-kit": {
+ "version": ""
+ }
+ }
}
\ No newline at end of file
diff --git a/modules/docs/src/Volo.Docs.Web/Volo.Docs.Web.abppkg b/modules/docs/src/Volo.Docs.Web/Volo.Docs.Web.abppkg
index 930c4018b3..8f16736603 100644
--- a/modules/docs/src/Volo.Docs.Web/Volo.Docs.Web.abppkg
+++ b/modules/docs/src/Volo.Docs.Web/Volo.Docs.Web.abppkg
@@ -1,3 +1,8 @@
{
- "role": "lib.mvc"
+ "role": "lib.mvc",
+ "npmDependencies": {
+ "@abp/docs": {
+ "version": ""
+ }
+ }
}
\ No newline at end of file