Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update blueprints to use native JS classes #17621

Merged
merged 5 commits into from
Feb 15, 2019

Conversation

ppcano
Copy link
Contributor

@ppcano ppcano commented Feb 15, 2019

Implements Update blueprints for each object type to use native JS classes of #17234

Related PRs ember-cli/ember-octane-blueprint#36 and ember-cli/ember-octane-blueprint#37

@@ -13,6 +13,7 @@ const expect = chai.expect;

const generateFakePackageManifest = require('../helpers/generate-fake-package-manifest');
const enableModuleUnification = require('../helpers/module-unification').enableModuleUnification;
const enableOctane = require('../helpers/setup-test-environment').enableOctane;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend to include the enableModuleUnification function into the /helpers/setup-test-environment module, but I would like to do that in an independent PR.

Copy link
Member

@rwjblue rwjblue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only one minor suggested tweak.

blueprints/controller/index.js Outdated Show resolved Hide resolved

module.exports = function(blueprint) {
blueprint.filesPath = function() {
let rootPath = process.env.EMBER_VERSION === 'OCTANE' ? 'native-files' : 'files';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For reference, we intend to come up with a better "flag" than process.env.EMBER_VERSION, but this unlocks actually being able to do the blueprint work while we figure that out.

Copy link
Member

@rwjblue rwjblue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for working on this!

@ppcano
Copy link
Contributor Author

ppcano commented Feb 15, 2019

@rwjblue, I have included the other blueprints and this is ready for merging now. 


Do we have also to support Native classes in the Ember Data blueprints? ember-decorators includes them, but they are not described in the Octane tracking issue.



ember-cli/ember-octane-blueprint#37 is related to this PR in case you want to share your opinion on how/if to get rid of the ember-decorators blueprints.

@rwjblue rwjblue merged commit 98b3128 into emberjs:master Feb 15, 2019
@ppcano ppcano changed the title Update controller blueprint to use native JS classes Update blueprints to use native JS classes Feb 16, 2019

module.exports = function(blueprint) {
blueprint.filesPath = function() {
let rootPath = process.env.EMBER_VERSION === 'OCTANE' ? 'native-files' : 'files';
Copy link
Sponsor Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't this edition in the blueprint? Am I misremembering?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the question.

Here is checking if the ENV.EMBER_VERSION is equal to 'OCTANEto use Native files instead of Emberextend`.

ember-cli/ember-octane-blueprint#36 set the env variable.

Copy link
Sponsor Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah ok, you right. I was misremembering. thank you! :)

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.

None yet

3 participants