Configure Ember CLI Mirage to support liverload for mirage configuration with Embroider - ember.js

I have an Ember.js application, which uses Embroider and Ember CLI Mirage. Sadly live-reload is not working for Mirage configuration changes. A change to Mirage configuration does not trigger a rebuild. It seems as if mirage/ folder is not watched.
I reproduced this issue in a newly created Ember application using Ember CLI v4.1 with the --embroider flag. So it is not related to any special configuration of my application.
Do I need to configure Embroider somehow to watch mirage/ folder?

I think this probably related to: https://github.com/embroider-build/embroider/issues/972
and there could certainly be more documentation, but there was a similar issue with Docfy here: https://github.com/josemarluedke/docfy/issues/110
Does this work with mirage?:
EMBROIDER_REBUILD_ADDONS='ember-cli-mirage' ember s

Related

How to enable forced listing with ember serve

I need to enable forced es-linting with ember serve. When ever ember serve is run server should hold till all the es-lintings errors are fixed. I can do it with custom npm script, but want to look for ember-cli alternatives before writing my own scripts.
You can enable ESLint via the Ember CLI ESLint addon. And it will integrate with ember test (or testing via the browser interface). I don't know if it'll actually fail the build, but it will fail your tests if you setup the ESLint rules to be errors, not just warnings.

Basic Ember app not working with default adapter

Here is the source code.
I'm running Ember-CLI from the master branch of the git repo (currently version 2.2.0-beta.1-master-e803ac7fa6) and linking via npm. This should be using versions 2.2.0 of Ember and Ember Data. In the middle of the basic tutorial, I hit an issue with Mirage and Ember Data. Without explicitly creating an application adapter, the app fails. There is a 404 error being thrown on the route that should be handled by Mirage, as well as numerous Adapter errors. No errors are shown during ember serve.
In trying to fix this, I ran into another issue. After running ember g adapter application, the app loaded in the browser but there was still an error because this generated a RESTAdapter instead of the preferred JSONAPIAdapter. After manually switching to the JSONAPIAdapter, everything is fine.
Is this an issue with Ember-CLI still using an old version of Ember Data somehow? Update: #Michael and #Gaurav found the issue with Ember-CLI. See his answer for the Github issue link.
The original question still stands, though. Should Ember be able to function without explicitly creating an adapter?
This is a bug with Ember CLI 2.2.0-beta.1 - it's using the wrong adapter type by default. Can you open an issue on Ember CLI? Thanks!

What are the respective purposes of the emberjs.com and ember-cli websites?

I am a bit confused regarding the ember websites "emberjs.com" and "ember-cli.com". Isn't ember-cli now a part of emberjs and documented at "emberjs.com"? If so, why have a different website for ember-cli? Also, why do the sites differ regarding the versions of the prerequisite JS frameworks? For example, the emberjs.com getting starting page says to use Node.js 0.12 or higher while the ember-cli.com site says to use the latest stable version of Node (version 4.0.x).
the emberjs.com getting starting page says to use Node.js 0.12 or
higher while the ember-cli.com site says to use the latest stable
version of Node (version 4.0.x).
Seems like emberjs.com is out of sync, you can create issue on emberjs.com website repository on GitHub or hope that it's already created and it will be resolved shortly. Also, there was as issue with bufferutil in Ember CLI + node.js 4.0, so they might wait until it's resolved, but for some reason it's recommended on ember-cli.com.
Isn't ember-cli now a part of emberjs and documented at "emberjs.com"?
It isn't part of Ember.js. It's part of Ember.js ecosystem. It's recommended tool to work with library and that's why examples in guides assume that you're using Ember CLI. But, you could also use Ember.js without Ember CLI by loading jQuery, Ember.js, Ember.js template compiler and working on globals.
Ember.js documents everything about library itself, how logic behind library works, core concepts. You have components, routing, controllers, models explained there, but you won't find information there how to add CoffeeScript to your project.
Ember CLI website documents everything about Ember CLI, which is tool that provides:
asset pipeline
a strong conventional project structure
powerful addon system for extension.
You can see in user-guide that it documents possible build configurations, how to make SASS or CoffeeScript working in your environment etc.

Deploy Ember Application

I have created an ember application (prior to the arrival of Ember CLI) which follows a file hierarchy as given below:
Modules
Controllers
Views
Models
Routes
App.js
I would like to know that is there any way to deploy these files by compiling as a single javascript and html file, like now we are doing in ember cli. Since my application is using offline APP Cache, I terribly need this feature to avoid save numberous files and downloading it from cache manifest file.
After some research I have decided to update application with Ember CLI. This seems to be the best option to build and deploy Ember Application.

How to build Ember API docs for beta builds? Or access beta API docs online?

I use Ember beta builds in my project and would like to use most recent API docs.
Also would be nice to be able to browse the docs when I am offline.
Is there any way I can build the API docs from the Ember github project?
Thanks,
They are using YUIDoc to generate the documents from their sourcecode. So install that, checkout the ember sources from github and then run yuidoc --server from the commandline to get it hosted on http://localhost:3000/.