Skip to content

[Feature] service blueprint for module unification - #16397

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

mixonic merged 1 commit into
emberjs:masterfrom
GavinJoyce:gj/mu-service-blueprint

Conversation

@GavinJoyce

@GavinJoyce GavinJoyce commented Mar 23, 2018 •

Copy link
Copy Markdown
Member

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
Comment thread node-tests/blueprints/service-test.js Outdated

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
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

Comment thread blueprints/service-test/index.js Outdated
module.exports = useTestFrameworkDetector({
description: 'Generates a service unit test.',

fileMapTokens: function() {

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 😄

Comment thread blueprints/service/index.js Outdated
description: 'Generates a service.'
description: 'Generates a service.',

fileMapTokens: function() {

Copy link
Copy Markdown
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
Copy Markdown
Member Author

@rwjblue this is ready for review

@mixonic

mixonic commented Apr 9, 2018

Copy link
Copy Markdown
Member

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