Skip to content

[Feature] service blueprint for module unification#16397

Merged
mixonic merged 1 commit intoemberjs:masterfrom
GavinJoyce:gj/mu-service-blueprint
Apr 9, 2018
Merged

[Feature] service blueprint for module unification#16397
mixonic merged 1 commit intoemberjs:masterfrom
GavinJoyce:gj/mu-service-blueprint

Conversation

@GavinJoyce
Copy link
Member

@GavinJoyce GavinJoyce commented Mar 23, 2018

part of ember-cli/ember-cli#7530

Landing this will unblock the other generator blueprints listed in ^

TODO:

@GavinJoyce GavinJoyce changed the title [WIP] [Feature] module unification service blueprint [WIP] [Feature] service blueprint for module unification Mar 23, 2018

//TODO: GJ: how does this get generated?
expect(_file('app/services/foo.js'))
.to.not.exist;
Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

even simpler: implement supportsAddon in the blueprint

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm, supportsAddon doesn't currently have access to project. Another option, modify the following to exclude project.isModuleUnification:

https://github.com/ember-cli/ember-cli/blob/758d269cc7f885183eac3aab948b8561574b19bd/lib/tasks/generate-from-blueprint.js#L26

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

This PR has landed

module.exports = useTestFrameworkDetector({
description: 'Generates a service unit test.',

fileMapTokens: function() {
Copy link
Contributor

Choose a reason for hiding this comment

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

You can use shorthand methods I think, since only node 4 is supported (and in 3 days, only node 6! 🎉 🎉 🎉 )

Copy link
Member

Choose a reason for hiding this comment

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

Sadly I think its actually the end of April 😭

Copy link
Contributor

Choose a reason for hiding this comment

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

crap, i thought it was the 1st 😭

Copy link
Contributor

Choose a reason for hiding this comment

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

anyway node 4 supports shorthand methods 😄

description: 'Generates a service.'
description: 'Generates a service.',

fileMapTokens: function() {
Copy link
Contributor

Choose a reason for hiding this comment

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

same

@GavinJoyce GavinJoyce changed the title [WIP] [Feature] service blueprint for module unification [Feature] service blueprint for module unification Apr 9, 2018
@GavinJoyce
Copy link
Member Author

@rwjblue this is ready for review

@mixonic
Copy link
Member

mixonic commented Apr 9, 2018

Looks great, thank you @GavinJoyce!

@mixonic mixonic merged commit 3b921b2 into emberjs:master Apr 9, 2018
@GavinJoyce GavinJoyce deleted the gj/mu-service-blueprint branch April 9, 2018 18:51
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