What is ember-cli?
Ember CLI is the command line interface for managing and developing Ember.js applications. It provides a robust set of tools for scaffolding, building, testing, and deploying Ember.js applications.
What are ember-cli's main functionalities?
Project Creation
This command creates a new Ember.js application with the name 'my-app'. It sets up the project structure, installs dependencies, and configures the build system.
ember new my-app
Generating Blueprints
This command generates a new component called 'my-component'. Blueprints are templates for generating various parts of an Ember.js application, such as components, routes, and services.
ember generate component my-component
Running the Development Server
This command starts a local development server, allowing you to preview your application in the browser. It also watches for file changes and automatically reloads the application.
ember serve
Building the Application
This command builds the Ember.js application for production. It optimizes the assets and outputs them to the 'dist' directory, ready for deployment.
ember build --environment production
Running Tests
This command runs the application's test suite. Ember CLI supports both unit and integration tests, and it can be configured to run tests in different environments.
ember test
Other packages similar to ember-cli
create-react-app
Create React App is a command line tool for creating and managing React applications. It provides a similar set of features to Ember CLI, including project scaffolding, development server, and build tools. However, it is tailored specifically for React applications.
vue-cli
Vue CLI is the standard tooling for Vue.js development. It offers a similar feature set to Ember CLI, including project creation, development server, and build tools. Vue CLI also provides a plugin system for extending its functionality.
angular-cli
Angular CLI is the command line interface for Angular applications. It provides tools for generating components, services, and other parts of an Angular application, as well as running a development server and building the application for production. It is similar to Ember CLI but tailored for Angular.
ember-cli
a ember commandline utility.
Warning
Although potentially exciting, this is still really a WIP, use at your own risk.
Why?
The https://github.com/stefanpenner/ember-app-kit project has proved to be quite useful, we have learned lots, and
it allowed us to iterate quickly while building real ambitious applications.
While it's initial incarnation is useful, it has several meta problems:
- It is not "simple" and appears daunting.
- Because of inline configuration, the api surface area is massive
- #2 does not allow users to express the "what" just the "how", this prevents EAK from doing more of the heavy lifting itself.
- [#2 #3] makes it quite tedious to upgrade
Rational for #3
If we want to upgrade or swap in a faster build pipeline it would be a major pain currently. But with #3, in theory it should be minimal pain.
Guidelines
- convention over configuration. (look to rails)
- we should provide internal configuration/implementation to satisfy the 'what' with the how.
- simple > easy
- the current contents of tasks/* should reside in the ember executables library
- the pipeline-related Broccoli configuration should also reside in the above mentioned library.
Usage
Install
This is an npm package and can be used locally by installing it globally
npm install -g
Current Commands
ember build <env-name>
ember server
ember init [app-name] [--dry-run] [--skip-npm-install]
Ideas
ember
ember init <app-name>
ember build <env-name> [default: development] [optional: target path]
ember server
--autotest [default: false]
--port [default: 8000]
--subscribe [default:release, optional: (beta|canary)]
--env [default: development]
--app [default: .]
ember generate [...]
ember generate scaffold [...]
ember addon
- folder structure: (very similar to what we currently have)
app/*
tasks/
vendor/
tests/
tmp/*
Broccolifile.js
package.json
bower.json
.gitignore
.travis
.jshintrc
new Error("tried compiling: app.coffee
but CoffesScript is Missing, to install please: npm install coffee-script --save-dev")
````
- tasks
consider extracting them into broccoli-ember