1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Generator: Do not overwrite README.md when updating

This commit is contained in:
Laurent Cozic 2021-01-05 17:57:42 +00:00
parent 734514b6d8
commit 520454affb
2 changed files with 6 additions and 6 deletions

View File

@ -49,7 +49,7 @@ In general all this is done automatically by the plugin generator, which will se
## Updating the plugin framework
To update the plugin framework, run `yo joplin --update`
To update the plugin framework, run `npm install -g generator-joplin && yo joplin --update`
Keep in mind that doing so will overwrite all the framework-related files **outside of the "src/" directory** (your source code will not be touched). So if you have modified any of the framework-related files, such as package.json or .gitignore, make sure your code is under version control so that you can check the diff and re-apply your changes.

View File

@ -65,10 +65,10 @@ module.exports = class extends Generator {
type: 'confirm',
name: 'proceed',
message: [
'Updating will overwrite all the generator files **except for the',
' src/ directory**. So if you have made any changes outside of src/',
' make sure your code is under version control so that you can inspect',
' the diff and re-apply your changes if needed. Do you want to proceed?',
'Updating will overwrite the config-related files. It will not change the',
' content of /src or README.md. If you have made any changes to some of the',
' config files make sure your code is under version control so that you can',
' inspect the diff and re-apply your changes if needed. Do you want to proceed?',
].join('\n'),
},
]);
@ -151,7 +151,6 @@ module.exports = class extends Generator {
'.npmignore_TEMPLATE',
'GENERATOR_DOC.md',
'package_TEMPLATE.json',
'README.md',
'tsconfig.json',
'webpack.config.js',
];
@ -159,6 +158,7 @@ module.exports = class extends Generator {
const noUpdateFiles = [
'src/index.ts',
'src/manifest.json',
'README.md',
];
const allFiles = files.concat(noUpdateFiles);