Migrate a structure of vue components in multiple files to SFC
The tool works as follows:
- will look for all the files with the
_component.js
postfix under the directory where the command was executed - for each file found, it will look for the template that match with the component name without the
_component.js
postfix, also if the component imports a style file, it will look for that style in thesrc/resource/scss
directory. - the script is parsed, and then the template, style and script are joined in a SFC
- the resulting SFC will be placed in the same module path under the
src/public/app
directory.
The tool can be installed via npm
npm i @mboxtael/hulivida-migration-tool
Go to the directory where the components are to be migrated, the directory can also contain subdirectories, and run the following command
hulivida-migration-tool