Giter Site home page Giter Site logo

Comments (10)

ef4 avatar ef4 commented on August 15, 2024 1

Based on what I described, it would necessarily be possible to add dependencies directly to the dummy app if you really want to. I'm not sure we'd want to rule that out -- maybe you need to test your addon both with and without another dependency present. But if you do that, you will need to run npm install in the dummy app.

Sticking to a subset of the main package.json and using * does seem like the sensible default behavior we should encourage.

from rfcs.

ef4 avatar ef4 commented on August 15, 2024 1

I edited the main post above to add another bad case I had forgotten about:

Because the dummy app and the addon share a package.json, it's not possible to test what happens when an app depends on your addon but does not directly depend on your addon's own addon dependencies. In a dummy app, all the addon's dependencies are forced to be direct dependencies of the app too. For example, if you addon uses ember-cli-sass, you can't test what happens when your addon is used in an app that doesn't happen to also use ember-cli-sass.

from rfcs.

kellyselden avatar kellyselden commented on August 15, 2024

The first point has a PR ember-cli/ember-cli#7602

from rfcs.

knownasilya avatar knownasilya commented on August 15, 2024

Should these be split up and submitted as RFCs?

from rfcs.

lennyburdette avatar lennyburdette commented on August 15, 2024

dummy apps would become 100% normal ember apps. They should have their own package.json (like ./sample-app/package.json) ...

  • Would this make developers think they can ember install or npm install --save-dev inside the ./sample-app directory?
  • Would we want some validation to ensure that ./sample-app/package.json doesn't include any packages not in the addon's package.json? Or would something like ember-cli-dependency-checker handle that for us?
  • Does it make sense to use * for versions in the sample-app's package.json to suggest that the sample-app inherits its dependencies from the addon?
    "devDependencies": {
      "ember-cli": "*",
      "ember-source": "*"
    }

Otherwise, 👍 ! I'm hoping that moving acceptance tests into the dummy app make engine tests easier. The sample-app application tests can run setApplication(), while the engine's rendering/container tests use setResolver(engineResolverFor(...)). Though I have no idea how that would work at runtime since setApplication and setResolver set global state ...

from rfcs.

bravo-kernel avatar bravo-kernel commented on August 15, 2024

From an end-user perspective I would really welcome the ability to create multiple dummy/sample apps.

from rfcs.

ASH-Michael avatar ASH-Michael commented on August 15, 2024

@bravo-kernel Isn't this already possible with routes in the dummy app?

From an end-user perspective I would really welcome the ability to create multiple dummy/sample apps.

from rfcs.

bravo-kernel avatar bravo-kernel commented on August 15, 2024

Not completely separated as far as I know. I think I need something like https://github.com/mansona/testing-mu to get what I'm after; completely isolating ember-addon-docs and my demo-app. Update: but I'm pretty new to Ember so I could be mistaken.

from rfcs.

ASH-Michael avatar ASH-Michael commented on August 15, 2024

@bravo-kernel I see what you are trying to accomplish now. Interesting.

from rfcs.

rwjblue avatar rwjblue commented on August 15, 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.