Skip to content

add ability to clean up old files in generators - #6472

Merged
homu merged 1 commit into
ember-cli:masterfrom
kellyselden:blueprint-file-remove
Jan 30, 2017
Merged

homu merged 1 commit into
ember-cli:masterfrom
kellyselden:blueprint-file-remove

Conversation

@kellyselden

Copy link
Copy Markdown
Member

A response to #6469 (comment)

This will probably need an RFC because it introduces a new blueprint member oldFilesToRemove. A blueprint can override the array and give a list of old file names that the generator (ember init or your own custom blueprint) will clean up for you.

@stefanpenner

stefanpenner commented Nov 27, 2016 •

Copy link
Copy Markdown
Contributor

I like the idea, but ya as you mentioned we will likely need to bikeshed the API somewhat. Likely a small RFC to get that ball rolling would be appropriate.

@homu

homu commented Dec 18, 2016

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #6473) made this pull request unmergeable. Please resolve the merge conflicts.

@homu

homu commented Jan 4, 2017

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #6636) made this pull request unmergeable. Please resolve the merge conflicts.

@rwjblue

rwjblue commented Jan 29, 2017

Copy link
Copy Markdown
Member

@kellyselden - ember-cli/rfcs#92 has been merged, can you rebase this and update to get it passing CI?

@kellyselden

Copy link
Copy Markdown
Member Author

Anyone want a better name than oldFilesToRemove?

@kellyselden
kellyselden force-pushed the blueprint-file-remove branch from fea2069 to dc69595 Compare January 29, 2017 18:41
@ro0gr

ro0gr commented Jan 29, 2017 •

Copy link
Copy Markdown
Contributor

Anyone want a better name than oldFilesToRemove?

Just an option - obsoleteFiles?

@kellyselden

Copy link
Copy Markdown
Member Author

@ro0gr That could be confused with ignoredFiles IMO, something we already have. It doesn't say what happens to the obsolete files.

@ro0gr

ro0gr commented Jan 29, 2017 •

Copy link
Copy Markdown
Contributor

@kellyselden I've checked the meaning of the word obsolete(not an expert in English). In general it means something like:

No longer produced or used; out of date

Usually I tend to cleanup things of this kind 😃

Anyway I don't have strong opinion for the name here, just want to share an option.

@rwjblue

rwjblue commented Jan 29, 2017

Copy link
Copy Markdown
Member

I'd prefer:

  • filesToRemove
  • removeFiles
  • obsoleteFiles
  • dieDieDie

I'm generally not a fan of using "old" or "new" in names....

@kellyselden

Copy link
Copy Markdown
Member Author

filesToRemove has my vote.

@rwjblue

rwjblue commented Jan 30, 2017

Copy link
Copy Markdown
Member

@kellyselden - Sounds good, I'd say go ahead and update...

homu added a commit that referenced this pull request Jan 30, 2017
Revert changes removing `bower.json` from default blueprints.

This reverts commit be142aa, reversing changes made to b90f860.

This is being reverted due to user experience issues when the `bower.json` file is no longer part of the blueprint.

As things exist prior to a revert, any user upgrading from a version of ember-cli prior to 2.11 would never be instructed to update their `bower.json` to remove entries for `ember`, `ember-cli-shims`, etc.

To bring the changes being reverted back, we need to land the ability for a blueprint to indicate that a file should be deleted as part of the `ember init` process.  This was RFC'ed in ember-cli/rfcs#92 and the implementation is pending in #6472 and should hopefully land in 2.13 (current ember-cli#master branch).

This was discussed at the ember-cli meeting on 2017-01-26.
@kellyselden
kellyselden force-pushed the blueprint-file-remove branch from dc69595 to 7490f05 Compare January 30, 2017 19:38
@kellyselden kellyselden changed the title WIP: add ability to clean up old files in generators add ability to clean up old files in generators Jan 30, 2017
@kellyselden

Copy link
Copy Markdown
Member Author

Rebased and changed to filesToRemove.

@kellyselden
kellyselden force-pushed the blueprint-file-remove branch from 7490f05 to 4bbc753 Compare January 30, 2017 19:50
@kellyselden
kellyselden force-pushed the blueprint-file-remove branch from 4bbc753 to 2cfb76e Compare January 30, 2017 20:08
@kellyselden

Copy link
Copy Markdown
Member Author

@homu r+

@homu

homu commented Jan 30, 2017

Copy link
Copy Markdown
Contributor

📌 Commit 2cfb76e has been approved by kellyselden

@homu

homu commented Jan 30, 2017

Copy link
Copy Markdown
Contributor

⚡ Test exempted - status

@homu
homu merged commit 2cfb76e into ember-cli:master Jan 30, 2017
ember-cli-canary-sync pushed a commit that referenced this pull request Jan 30, 2017
add ability to clean up old files in generators

A response to #6469 (comment)

This will probably need an RFC because it introduces a new blueprint member `oldFilesToRemove`. A blueprint can override the array and give a list of old file names that the generator (ember init or your own custom blueprint) will clean up for you.
@kellyselden
kellyselden deleted the blueprint-file-remove branch January 30, 2017 20:21
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.

5 participants