Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lifeart/ember-fast-cli
Ember Fast CLI - fast command line inteface for ember projects
https://github.com/lifeart/ember-fast-cli
addon blueprints cli ember-cli emberjs
Last synced: 13 days ago
JSON representation
Ember Fast CLI - fast command line inteface for ember projects
- Host: GitHub
- URL: https://github.com/lifeart/ember-fast-cli
- Owner: lifeart
- License: mit
- Created: 2019-12-18T20:42:51.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-01-02T09:33:01.000Z (almost 4 years ago)
- Last Synced: 2024-10-26T17:15:11.068Z (25 days ago)
- Topics: addon, blueprints, cli, ember-cli, emberjs
- Language: JavaScript
- Homepage:
- Size: 642 KB
- Stars: 28
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
ember-fast-cli
==============================================================================This addon allow execute cli commands on running `ember-cli` instance.
`ember-cli` commands execution relatively slow, because we need to `revalidate` all dependencies and `initialize` all addons on each command execution (we have to boot full `cli` to execute any blueprint).
It may take up to `5-20s` to generate component using `ember g component foo-bar`.
But, if we will execute commands on already started cli (development server, running by `ember s`), we can get __500x__ boost on `cli` performance, for my case component generation time reduced from `10s` to `0.2s`.
![terminal](previews/terminal.png)
Compatibility
------------------------------------------------------------------------------* Ember.js v3.16 or above
* Ember CLI v2.13 or above
* Node.js v10 or aboveInstallation
------------------------------------------------------------------------------```
ember install ember-fast-cli
```Usage
------------------------------------------------------------------------------How to run addon with `ember-cli < 3.16.0`
edit `node_modules/ember-cli/lib/cli/index.js` and add one line```js
cli.env = environment; // <-- we need to add this line
```[here:](https://github.com/ember-cli/ember-cli/blob/7d80dbf3a28f23044c1c7544db6f7ca3792185a3/lib/cli/index.js#L145)
```js
let environment = {
tasks: loadTasks(),
cliArgs: options.cliArgs,
commands: loadCommands(),
project,
settings: merge(defaultUpdateCheckerOptions, config.getAll()),
};cli.env = environment; // <-- we need to add this line
return cli.run(environment).finally(() => willInterruptProcess.release());
```After you have started your development server using `ember serve`, this addon adds a custom middleware listening to `/cli` endpoint.
Open [http://localhost:4200/cli](http://localhost:4200/cli) in your web browser to access `fast-cli`.
type: `g component foo-bar` + Enter
Check files! Repeat if you enjoying it. Star if you like it! :)
Also, `ember-fast-cli` working with [Unstable Ember Language Server](https://marketplace.visualstudio.com/items?itemName=lifeart.vscode-ember-unstable), and allow developers to execute `ember-cli` commands from `vscode` command interface. Open `vscode` command line and search for `Ember`.
Contributing
------------------------------------------------------------------------------See the [Contributing](CONTRIBUTING.md) guide for details.
License
------------------------------------------------------------------------------This project is licensed under the [MIT License](LICENSE.md).