Skip to content

Commit c78cf16

Browse files
committed
remove repeating copy and remove of node_modules
1 parent 1514f27 commit c78cf16

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lib/services/plugins-service.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,17 +124,13 @@ export class PluginsService implements IPluginsService {
124124
}
125125

126126
if (exists) {
127-
this.$fs.ensureDirectoryExists(pluginDestinationPath).wait();
128-
shelljs.cp("-Rf", pluginData.fullPath, pluginDestinationPath);
129-
127+
//prepare platform speciffic files, .map and .ts files
130128
this.$projectFilesManager.processPlatformSpecificFiles(pluginDestinationPath, platform).wait();
131129

130+
//deal with platforms/android folder in ns plugin
132131
pluginData.pluginPlatformsFolderPath = (_platform: string) => path.join(pluginData.fullPath, "platforms", _platform);
133132
platformData.platformProjectService.preparePluginNativeCode(pluginData).wait();
134-
135133
shelljs.rm("-rf", path.join(pluginDestinationPath, pluginData.name, "platforms"));
136-
// Remove node_modules of the plugin. The destination path should have flattened node_modules.
137-
shelljs.rm("-rf", path.join(pluginDestinationPath, pluginData.name, constants.NODE_MODULES_FOLDER_NAME));
138134

139135
// Show message
140136
this.$logger.out(`Successfully prepared plugin ${pluginData.name} for ${platform}.`);

0 commit comments

Comments
 (0)