Skip to content

Skippable files - prevent certain deleted files from being recreated#61

Open
OscarBarrett wants to merge 1 commit intonystudio107:masterfrom
OscarBarrett:feature/skippable-files
Open

Skippable files - prevent certain deleted files from being recreated#61
OscarBarrett wants to merge 1 commit intonystudio107:masterfrom
OscarBarrett:feature/skippable-files

Conversation

@OscarBarrett
Copy link
Copy Markdown

Related to #55

Adds support for a skippable property for TEMPLATE_FILES and BOILERPLATE_FILES items.

When running the generator for a previously generated plugin, files marked as skippable will not be recreated if they no longer exist.

At this stage I've marked the following files as skippable:

  • Markdown/text files
  • .gitignore
  • releases.json
  • Translations
  • Icons

It might be worth considering whether to make twig, css and js files skippable as well (in case they were renamed or not required).

Currently there's no opt-in or out for this. I could add an option to ask the user whether they want to recreate skippable files or not.

I also haven't adjusted the output - we could report the skipped files to the user.

- DRYed up file writes
- Added skippable property checks to skip the write if the full plugin
is not being generated
- Updated json configs to make markdown/text files, .gitignore,
releases.json, translations and icons skippable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant