Conversation
| let targetsPath = path.join(this.root, configPath, 'targets'); | ||
|
|
||
| let appTargets; | ||
| if (existsSync(`${targetsPath}.js`)) { |
There was a problem hiding this comment.
I believe this should use require since the targets file isn't valid JSON and we want to allow usage of node-land things anyways.
There was a problem hiding this comment.
Done, but test fail. I've created the file with the right content, but I can't require it.
I suspect that must be something obvious related with how the fake filesystem works in tests.
| /* eslint-env node */ | ||
|
|
||
| module.exports = { | ||
| browsers: [] // ["last 2 versions", "safari >= 7"] |
There was a problem hiding this comment.
Let's inline the default here also (instead of the comment). This lets us update the default for new apps without potentially breaking existing ones.
| @method targets | ||
| @return {Object} Targets object | ||
| */ | ||
| get targets() { |
There was a problem hiding this comment.
we should memoize this to avoid reading from disk on every access
|
All feedback applied. There is still the issue of the failing test because |
|
I've fixed the tests and validated its behaviour in app (installing it from my github). Open implementation questions:
|
|
@rwjblue Removed references to node since it was withdrawn from the RFC. |
71aa2b1 to
25e24d9
Compare
|
@rwjblue Added to experiments. |
|
@homu r+ |
|
📌 Commit 25e24d9 has been approved by |
Implement targets RFC This PR implements ember-cli/rfcs#95 (still unmerged). API example ```js app.project.targets; // { browsers: [...], node: '6.6.0' }; ```
|
☀️ Test successful - status |
This PR implements ember-cli/rfcs#95 (still unmerged).
API example