stefanpenner/ember-cli — pull request #2197 by trabus (2014-10-05 03:01:10+00:00)
Title: ember init <path/to/file> or <glob> should apply init to those files

Adds optional globbing functionality to `ember init` as described in #2156, and moves original functionality to `ember init --name=`.

In the current state of this PR, `ember init ` only accepts and applies a single glob pattern. For instance `ember init foo.js bar.js package.json` would only use "foo.js" and ignore the additional rawArgs. If desired, multiple patterns could be accepted, but would require additional work. It should be noted that multiple files are technically already supported through glob patterns like `'{app/**,package.json}'` supported by the [minimatch library](https://github.com/isaacs/minimatch).

Direct paths also use the glob-pattern and will match with a small possibility of matching more than the intended path if the pattern is too general (i.e. "foo.js" vs "app/routes/foo.js").

Additionally, I had some difficulty with unquoted glob patterns with wildcards (i.e. "**/*.js", would resolve the pattern upon parsing the rawArgs), and so quotes are required for patterns including wildcard characters.

The tests I've written so far are still lacking, would love some input or suggestions on what tests should be written to support this.