@@ -161,7 +161,7 @@ export default class Target extends Plugin {
161161 const pluginTypeFolder = await this . getTypeFolder ( )
162162 if ( this . isLocalSource ) {
163163 await fs . ensureDir ( path . resolve ( this . cwd , 'src' , pluginTypeFolder ) )
164- const pluginPath = path . resolve ( this . cwd , 'src' , pluginTypeFolder , this . name )
164+ const pluginPath = path . resolve ( this . cwd , 'src' , pluginTypeFolder , this . packageName )
165165 await fs . rm ( pluginPath , { recursive : true , force : true } )
166166 await fs . copy ( this . sourcePath , pluginPath , { recursive : true } )
167167 const bowerJSON = await fs . readJSON ( path . join ( pluginPath , 'bower.json' ) )
@@ -177,7 +177,7 @@ export default class Target extends Plugin {
177177 const repoDetails = await this . getRepositoryUrl ( )
178178 if ( ! repoDetails ) throw new Error ( 'Error: Plugin repository url could not be found.' )
179179 await fs . ensureDir ( path . resolve ( this . cwd , 'src' , pluginTypeFolder ) )
180- const pluginPath = path . resolve ( this . cwd , 'src' , pluginTypeFolder , this . name )
180+ const pluginPath = path . resolve ( this . cwd , 'src' , pluginTypeFolder , this . packageName )
181181 await fs . rm ( pluginPath , { recursive : true , force : true } )
182182 const url = repoDetails . url . replace ( / ^ g i t : \/ \/ / , 'https://' )
183183 try {
@@ -206,7 +206,7 @@ export default class Target extends Plugin {
206206 }
207207 // bower install
208208 const outputPath = path . join ( this . cwd , 'src' , pluginTypeFolder )
209- const pluginPath = path . join ( outputPath , this . name )
209+ const pluginPath = path . join ( outputPath , this . packageName )
210210 try {
211211 await fs . rm ( pluginPath , { recursive : true , force : true } )
212212 } catch ( err ) {
0 commit comments