andoshin11 / vue-cli-plugin-nuxt-starter-template

Nuxt.js starter project template for vue-cli v3. https://starter.nuxtjs.org
MIT License
48 stars 4 forks source link

Use virtual tree instead of disk to move files to legacy/ #2

Open oncomouse opened 6 years ago

oncomouse commented 6 years ago

The code in api.postProcessFiles doesn't work as written when the plugin is used in a new project (vue create instead of vue add). As far as I can tell, this is because vue-cli generator plugins execute against a virtual file tree before any files are created on disk. So, when creating a new projects, fs.move won't work because the files don't actually exist yet. However, if you manipulate the files object passed to the callback in api.postProcessFiles, the changes will be made for a new project.