Giter Site home page Giter Site logo

Extensibility Needs Examples about rfcs HOT 11 CLOSED

ember-cli avatar ember-cli commented on July 16, 2024
Extensibility Needs Examples

from rfcs.

Comments (11)

stefanpenner avatar stefanpenner commented on July 16, 2024

Basically we are looking for some tasks/commands/addon mains that are too complicated or at least feel strange/redundant or painful

from rfcs.

runspired avatar runspired commented on July 16, 2024

I've been collecting, lots coming, had to hunker down on client work this week but back at this project tomorrow late afternoon :)

from rfcs.

stefanpenner avatar stefanpenner commented on July 16, 2024

No rush, I'm also getting busy for the next few weeks. But if they are posted we can take a look as time permits and start formulating some solutions

from rfcs.

MiguelMadero avatar MiguelMadero commented on July 16, 2024

I have a demo repo of how to create different "packages" as the output of a build. The important part is the ember-cli-build it keeps changing, so please look at this commit. There are more details on the README.

The goal is to break app.[js|css] into smaller packages or bundles based on a folder structure. This works great, but seems fiddly, error prone, it has some performance issues since some of the trees are still unnecessarily executing once per package instead of only once. It's also not super intuitive that we treat each "package" as its own EmberApp.

from rfcs.

nathanhammond avatar nathanhammond commented on July 16, 2024

From @tomdale

so addons can specify they need to run before or after a specific other addon
but in my case, I need to have some trees be processed by broccoli-asset-rev, and some after
specifically I have some HTML and JS assets that should be processed
but then I need to write the final, rewritten paths of those to a manifest
so basically: 1) I add some trees to the final app tree 2) those files get processed by broccoli-asset-rev 3) I add a new tree that contains a manifest
I could manually invoke broccoli-asset-rev on my tree, but it seems bad…

Maybe he can provide a bit more color as to what's going on.

from rfcs.

stefanpenner avatar stefanpenner commented on July 16, 2024

@MiguelMadero can you move that to a gist please, or ideally a demo app using it, that would be great. I would like to prevent people from posting miles of code in this comment thread.

from rfcs.

MiguelMadero avatar MiguelMadero commented on July 16, 2024

Done

from rfcs.

nathanhammond avatar nathanhammond commented on July 16, 2024

In our existing builder code if we want to run anything at the very, very, end of the build we can't do it without importing and monkeypatching the builder object inside of the host application, or redoing the build command from an addon, which requires unraveling an entire daisy chain of models and tasks and doing approximately what ember-cli-deploy has done.

This is one place where we'd like to insert arbitrary code:
https://github.com/ember-cli/ember-cli/blob/master/lib/models/builder.js#L173

Basically, it's not possible to gracefully extend this behavior from within an addon.

/cc @trentmwillis @chadhietala @lukemelia

from rfcs.

chadhietala avatar chadhietala commented on July 16, 2024

Difficult to coordinate and create layered artifacts. This is sort of the registry problem but with actually producing an artifact and not just transforming it. Example: You need to produce a config file. Addon A needs to write some metadata to this file. Addon B needs to write some metadata to this file. You can do i t today, but requires you create some global mutable state.

from rfcs.

chadhietala avatar chadhietala commented on July 16, 2024

In development you should be running as close as possible to a production environment as possible. Currently serving the app is coupled to express. If you want to use something else there isn't a good hook or place to say please setup your server.

from rfcs.

rwjblue avatar rwjblue commented on July 16, 2024

We are working on closing the ember-cli/rfcs repo in favor of using a single central RFC's repo for everything. This was laid out in https://emberjs.github.io/rfcs/0300-rfc-process-update.html.

Sorry for the troubles, but would you mind reviewing to see if this is still something we need, and if so migrating this over to emberjs/rfcs?

from rfcs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.