Skip to content

Add Blueprint.prototype.insertIntoFile.#1857

Merged
rwjblue merged 1 commit into
ember-cli:masterfrom
rwjblue:add-insert-into-file
Sep 3, 2014
Merged

Add Blueprint.prototype.insertIntoFile.#1857
rwjblue merged 1 commit into
ember-cli:masterfrom
rwjblue:add-insert-into-file

Conversation

@rwjblue

@rwjblue rwjblue commented Sep 3, 2014

Copy link
Copy Markdown
Member
  • Inserts the provided content into a file (always at the end right now).
  • Only inserts once unless force option is truthy.

Inspired by Thor#insert_into_file.

Future additons will include more options:

  • before - Insert before given string/regex.
  • after - Insert after a given string/regex.

@rwjblue

rwjblue commented Sep 3, 2014

Copy link
Copy Markdown
Member Author

@jgwhite - I think you mentioned this somewhere in your original Blueprint PR...

@jgwhite

jgwhite commented Sep 3, 2014

Copy link
Copy Markdown
Contributor

Yup, this is exactly what I had in mind. Nice :shipit:

* Inserts the provided content into a file (always at the end right now).
* Only inserts once unless `force` option is truthy.
@rwjblue rwjblue force-pushed the add-insert-into-file branch from 73577b1 to a39064a Compare September 3, 2014 12:08
rwjblue added a commit that referenced this pull request Sep 3, 2014
Add Blueprint.prototype.insertIntoFile.
@rwjblue rwjblue merged commit ffcd87b into ember-cli:master Sep 3, 2014
@rwjblue rwjblue deleted the add-insert-into-file branch September 3, 2014 12:26
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.

3 participants