Add more packages
Ember CLI provides bower support by using the following command:
Every few months, the core team of Ember will gather to discuss the current problems and decide the various transactions that need to be prioritized in the next quarter.
This time, in Portland, Oregon, everyone gathered to discuss the development direction of 2014.
Development Tools & Modules
We spent a lot of time discussing how to integrate ES6 modules with fast, powerful, and functional development tools.
One of the reasons why I like Ember communication meetings is that the faster it is applied in practice, the more valuable it is. For us, solving problems is more important than proposing solutions because different solutions will not change as applications grow.
So far, we have not yet recognized any specific build tool, because we have investigated them in depth, currently, all available options have fatal defects that make your application larger, which will make your application very unpleasant.
Many people have also asked us about modules. When we started the Ember project, there was no popular module format. However, since then, CommonJS's server-side modules and AMD's browser modules have been explosively popularized. Although both of them are good choices, their ecosystem is broken, and their communities often quarrel over the Emacs/vi style.
Fortunately, TC39, the JavaScript maintenance committee, recognized the need for a unified module system. The ES6 module provides the best part of AMD and CommonJS modules and is directly integrated into the language.
Initialization
- ember new my-app
Initialize the Ember. js project and create the root directory, including app and router.
Enable Development Server
- ember server
Run the test program
- ember test
To run the Qunit test program, you need the PhantomJS plug-in on the Karma browser), even though we are planning to migrate it into the development program for better development.
You can also run the following command to start the QUnit test:
- ember test:server
Add more packages
Ember CLI provides bower support by using the following command:
The general Franca module in Ember is part of the ES6 module. We will ensure that the bower module can be automatically called by the Ember application through correction of global packages in AMD, CommonJS, and browser:
Even if a library is used by AMD, you can use it as an ES6 module:
- import md from "markdown";
When the file changes, the associated file app. js, app.css, and so on will be locked by the browser. Each HTTP request to access the file will be suspended until the new version is compiled.
Enhanced inspection tool Functions
If you are using the Ember CLI tool to develop your application, Chrome and Firefox will become your preferred choice. The Development Server opens an interface to connect the checking tool to provide additional Environment Information for the browser.
Once a link is established between your browser and development tool, you can do a lot of interesting things, but we have to decide in advance:
- Saw a bunch of bower packages
- View running result
- Review code
- Use the visual editor to configure package. json
File System layout
The following is a simple example of the layout you will see when you initialize a new Ember app through CLI:
- app/
- controllers/
- models/
- fonts/
- …
- config/
- shim.json
- vendor/
- underscore.js // bower installed
- markdown.js
- lib/
- ember-histogram/ // incubator for packages
- skylight/
- bower.json
- modules/ // non-MVC stuff
- underscore.js