Open bodograumann opened 5 years ago
Could you detail the step bu step scenario please; Thanks
Sure. Have vue-cli-3
installed. Create a file called component-preset.json
with the content
{
"plugins": {
"vue-cli-plugin-component": {
"prompts": true
}
}
}
Then call vue create --preset component-preset.json test-component
. Give the component name and answer no to all the questions. (Alternatively you could probably remove "prompts": true
in the preset and predefine the name instead, but I did not look up what the name setting is called for your plugin.)
Tried to reproduce today your scenario with last version of the plugin: everything worked.
That is weird. Are you certain? This is what I get with the latest version 1.10.5:
[β¦]
π Invoking generators...
vue-cli-plugin-component
? Enter the component name (in PascalCase- no hyphen nor dash): TestComponent
? Use componentFixture to build example? No
? Use vue-styleguidist to generate documentation? No
? Use vuedoc.md to automatically generate README API section? No
? Add project badges to README.md? No
? Add license? No
File not found README.md
π¦ Installing additional dependencies...
[β¦]
Note the βFile not found README.mdβ.
Iβm on node v8.12.0, if that has anything to do with itβ¦
What Os? Linux I guess?
Yes: Linux 4.17.19-gentoo
Which version of vue-cli? If it is not the last one, could you please update your vue-cli version and try to reproduce?
It is the latest version: @vue/cli@3.2.1
I just did do npm update -g
.
Please try my reproduction: https://github.com/bodograumann/component-plugin-test
It seems to me, that vue-cli is generating the README.md only after the plugin generators have been run.
At least for preset generators I know it is possible to postpone running some modifications with api.onCreateComplete(mycallback)
. Maybe this is needed here as well.
There are also several differences in comparison to using vue add component
afterwards:
README.md
and App.vue
are not changedassets
and components
directories under src
When creating a vue project with the following preset:
and answering no to all the questions, there is no new content added to the readme file. Also the asset directory is not deleted.