-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Import blueprints from ember-cli
#13029
Conversation
@stefanpenner could you please verify the list of blueprints to import? I'm not entirely sure about the blueprints on the second list. |
@stefanpenner it seems that |
also |
I think resource can safely go away. It's not technically supported anymore. |
@Turbo87 Regarding the addon-import stuff, yes, I would import directly from ember-cli as you were asking. Semi-related to addon-import, I'd like to maybe take an opportunity to rename those blueprints to be more specific: ember-cli/ember-cli#5402 |
|
☔ The latest upstream changes (presumably #13048) made this pull request unmergeable. Please resolve the merge conflicts. |
1eb9e99
to
6859e49
Compare
porting |
solved this similar to ember-cli/ember-cli#5575 this PR should be ready for review and potentially merging now |
ember-cli
ember-cli
LVGTM, I plan to try test this out today. |
FYI not yet compatible with |
@Turbo87 it might be worth copying the addon-import blueprint to ember itself, and using that instead of importing the one from ember-cli. |
@@ -0,0 +1,3 @@ | |||
/*jshint node:true*/ | |||
|
|||
module.exports = require('ember-cli/blueprints/addon-import'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ya, we should likely extract addon-import. Don't want ember bringing ember-cli with.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, I'm not sure if that's so easy. addon-import
is used by default in ember-cli
so we probably shouldn't remove it there but I'm not a big fan of duplication either.
then again since it's the default there I'm not sure why this helper-addon
blueprint is even needed if it just passes on to the default. the only advantage would be to be able to generate it directly with ember g helper-addon
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should try to decouple. ember bundling ember-cli is no-beuno.
I admittedly though haven't investigated this deeply today, it is possible im missing something
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should try to decouple. ember bundling ember-cli is no-beuno.
totally agree on that 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
solved it like this: a12a193
☔ The latest upstream changes (presumably #13057) made this pull request unmergeable. Please resolve the merge conflicts. |
|
||
var fs = require('fs-extra'); | ||
var path = require('path'); | ||
var Promise = require('ember-cli/lib/ext/promise'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since ember-cli
is a dev dependency on ember
this should be okay, but I'm open to better suggestions.
☔ The latest upstream changes (presumably #13067) made this pull request unmergeable. Please resolve the merge conflicts. |
☔ The latest upstream changes (presumably #13087) made this pull request unmergeable. Please resolve the merge conflicts. |
@emberjs/core we are basically ready to merge this, and this is one of the steps to fix version issues between ember-cli and ember (and get us off bower) r? |
"route-recognizer": "0.1.5", | ||
"rsvp": "~3.1.0", | ||
"serve-static": "^1.10.0", | ||
"simple-dom": "^0.2.7", | ||
"testem": "^1.0.0-rc.3" | ||
}, | ||
"dependencies": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems fine. FWIW tooling like webpack expects npm dependencies
to be things you expect to bring into the client-side with you. Taking this step of adding deps will limit our ability to ship Ember itself in a webpack-compatible manner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is something that would need to get solved on the ember-cli side more globally. If we put those dependencies into devDependencies
instead, they usually won't get installed and might be missing when someone tries to generate blueprints.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The two systems (build-time deps for Ember addons using dependencies, and runtime deps for webpack using dependencies) are at odds. That's what I'm pointing out. I totally acknowledge that you need to add these here if Ember itself is an addon.
We can say "We don't care about webpack users" or "they can use old-school vendored assets", but I'd like to see some feedback on that approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately that world view isn't compatible with ours. Our add ons bring there build-debs along, so they can be built by consumers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @stefanpenner, their worldview just isn't compatible and I don't want to burn cycles worrying about people trying to use webpack.
I think |
Thank you so much @Turbo87 ! |
@emberjs/core seems like generally positive about this, are we ok with merging? Or what steps are required. |
Import blueprints from `ember-cli`
🎉 |
This PR imports the blueprints and blueprint acceptance tests from
ember-cli
and continues #13000:acceptance-test
- Generates an acceptance test for a featurecomponent
- Generates a componentcomponent-addon
- Generates a componentcomponent-test
- Generates a component integration or unit testcontroller
- Generates a controllercontroller-test
- Generates a controller unit testhelper
- Generates a helper functionhelper-addon
- Generates an import wrapperhelper-test
- Generates a helper unit testinitializer
- Generates an initializerinitializer-addon
- Generates an import wrapperinitializer-test
- Generates an initializer unit testinstance-initializer
- Generates an instance initializerinstance-initializer-addon
- Generates an import wrapperinstance-initializer-test
- Generates an instance initializer unit testmixin
- Generates a mixinmixin-test
- Generates a mixin unit testroute
- Generates a route and a template, and registers the route with the routerroute-addon
- Generates import wrappers for a route and its templateroute-test
- Generates a route unit testservice
- Generates a serviceservice-test
- Generates a service unit testtemplate
- Generates a templatetest-helper
- Generates a test helperutil
- Generates a simple utility module/functionutil-test
- Generates a util unit testBlueprints that should remain in
ember-cli
:addon
- The default blueprint for ember-cli addonsaddon-import
- Generates an import wrapperapp
- The default blueprint for ember-cli projectsblueprint
- Generates a blueprint and definitionhttp-mock
- Generates a mock api endpoint in /api prefixhttp-proxy
- Generates a relative proxy to another serverin-repo-addon
- The blueprint for addon in repo ember-cli addonslib
- Generates a lib directory for in-repo addonsresource
- Generates a model, template, route, and registers the route with the routerserver
- Generates a server directory for mocks and proxiesvendor-shim
- Generates an ES6 module shim for global libraries/cc @stefanpenner