Giter VIP home page Giter VIP logo

ember-fast-cli's Introduction

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

Compatibility

  • Ember.js v3.16 or above
  • Ember CLI v2.13 or above
  • Node.js v10 or above

Installation

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

cli.env = environment; // <-- we need to add this line

here:

  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 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, and allow developers to execute ember-cli commands from vscode command interface. Open vscode command line and search for Ember.

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.

ember-fast-cli's People

Contributors

ember-tomster avatar lifeart avatar sweet-bob avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

sweet-bob

ember-fast-cli's Issues

support proxy serving

looks like if we will run addon before:broccoli-serve-files, it will bring support for fast-cli for proxy/non-proxy users

Why do we need the manual edit on install?

edit node_modules/ember-cli/lib/cli/index.js and add one line
cli.env = environment; // <-- we need to add this line

Why can't this be compiled in? I'm sure there's a good reason but I can't think what it would be

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.