You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently discovered that ember-cli has the ability to setup server mocks using ember g http-mock posts. It installs the http-mock library and sets up a server/ folder with some boilerplate.
I personally use ember-cli-mirage in every project, and although it can feel bit larger in terms of surface area, I think the request handling bit of it can be given first class support in Ember CLI core. The database part (schema/db/factories/models) of Mirage is a more advanced feature (which I love), but could come from userland (similar to something like faker.js).
Considering that Mirage is moving to a framework-agnostic setup, I think this is a good time to revisit how Ember CLI can integrate it (probably by including it in package.json, rather than exposing it as an opaque generator command.)
The text was updated successfully, but these errors were encountered:
mehulkar
changed the title
Remove http-mocks feature from Ember Cli
Replace http-mocks feature from Ember Cli with Mirage (or parts of it)
Aug 13, 2019
mehulkar
changed the title
Replace http-mocks feature from Ember Cli with Mirage (or parts of it)
[ember-cli] Replace http-mocks feature from with Mirage
Nov 23, 2019
I kinda hoped mirage would integrate with http-mock better as the client side fake generation is super slow. I have a relatively small app that takes 5 seconds to load because it's spending the time to generate all the fake objects. Since Ember doesn't have hot module reload, this happens on every code change.
I love the mirage workflow, but it's really unacceptable to take 5 seconds to see my change.
I recently discovered that ember-cli has the ability to setup server mocks using
ember g http-mock posts
. It installs thehttp-mock
library and sets up aserver/
folder with some boilerplate.This feature is documented on the old ember-cli website: https://ember-cli.com/user-guide/#mocks, but not in the new guides as far as I can see: https://cli.emberjs.com/release/.
I personally use
ember-cli-mirage
in every project, and although it can feel bit larger in terms of surface area, I think the request handling bit of it can be given first class support in Ember CLI core. The database part (schema/db/factories/models) of Mirage is a more advanced feature (which I love), but could come from userland (similar to something like faker.js).Considering that Mirage is moving to a framework-agnostic setup, I think this is a good time to revisit how Ember CLI can integrate it (probably by including it in package.json, rather than exposing it as an opaque generator command.)
The text was updated successfully, but these errors were encountered: