CLI tool for Angular
Last updated a year ago by ddavis2xtivia .
LGPL-3 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @speedray/cli 
SYNC missed versions from official npm registry.

Speedray CLI

Build Status Dependency Status devDependency Status npm

Prototype of a CLI for Angular applications deployed to Liferay DXP based on the angular-cli project.


The CLI is now in beta. If you wish to collaborate while the project is still young, check out our issue list.

Before submitting new issues, have a look at issues marked with the type: faq label.

Liferay DXP Support

The server command is replaced with the deploy command. All testing and debugging is performed in a Liferay DXP instance. The webpack compilation is used to create a liferay DXP osgi module. This module is deployed to liferay DXP and is started to make it available for use in the liferay environment.


Both the CLI and generated project have dependencies that require Node 6.9.0 or higher, together with NPM 3 or higher and Liferay DXP FP 11 or higher.

Table of Contents


BEFORE YOU INSTALL: please read the prerequisites

npm install -g @speedray/cli


sr help

Generating and serving an Angular project via a development server

sr deploy --watch

Navigate to http://localhost:8080/. The app will automatically reload if you change any of the source files.

You can configure the default HTTP host and port used by the development server with two command-line options :

sr deploy --host --port 11311

Generating Components, Directives, Pipes and Services

You can use the sr generate (or just sr g) command to generate Angular components:

sr generate component my-new-component
sr g component my-new-component # using the alias

# components support relative path generation
# if in the directory src/app/feature/ and you run
sr g component new-cmp
# your component will be generated in src/app/feature/new-cmp
# but if you were to run
sr g component ../newer-cmp
# your component will be generated in src/app/newer-cmp

You can find all possible blueprints in the table below:

Scaffold Usage
Component ng g component my-new-component
Directive ng g directive my-new-directive
Pipe ng g pipe my-new-pipe
Service ng g service my-new-service
Class ng g class my-new-class
Guard ng g guard my-new-guard
Interface ng g interface my-new-interface
Enum ng g enum my-new-enum
Module ng g module my-module

Updating Speedray CLI

To update Speedray CLI to a new version, you must update both the global package and your project's local package.

Global package:

npm uninstall -g @speedray/cli
npm cache clean
npm install -g @speedray/cli@latest

Local project package:

rm -rf node_modules dist # use rmdir /S/Q node_modules dist in Windows Command Prompt; use rm -r -fo node_modules,dist in Windows PowerShell
npm install --save-dev @speedray/cli@latest
npm install

You can find more details about changes between versions in CHANGELOG.md.

Development Hints for hacking on Speedray CLI

Working with master

git clone https://github.com/ddavis2xtivia/speedray-cli.git
cd speedray-cli
npm link

npm link is very similar to npm install -g except that instead of downloading the package from the repo, the just cloned speedray-cli/ folder becomes the global package. Any changes to the files in the speedary-cli/ folder will immediately affect the global @speedray/cli package, allowing you to quickly test any changes you make to the cli project.

Now you can use @speedray/cli via the command line:

sr new foo
cd foo
npm link @speedray/cli
sr serve

npm link @speedray/cli is needed because by default the globally installed @speedray/cli just loads the local @speedray/cli from the project which was fetched remotely from npm. npm link @speedray/cli symlinks the global @speedray/cli package to the local @speedray/cli package. Now the speedray-cli you cloned before is in three places: The folder you cloned it into, npm's folder where it stores global packages and the Speedray CLI project you just created.

You can also use sr new foo --link-cli to automatically link the @speedray/cli package.

Please read the official npm-link documentation and the npm-link cheatsheet for more information.


The documentation for the Angular CLI is located in this repo's wiki.



Current Tags

  • 1.0.0-1.27                                ...           latest (a year ago)

32 Versions

  • 1.0.0-1.27                                ...           a year ago
  • 1.0.0-1.26                                ...           a year ago
  • 1.0.0-1.25                                ...           a year ago
  • 1.0.0-1.24                                ...           a year ago
  • 1.0.0-1.23                                ...           a year ago
  • 1.0.0-1.22                                ...           a year ago
  • 1.0.0-1.21                                ...           2 years ago
  • 1.0.0-1.20                                ...           2 years ago
  • 1.0.0-1.19                                ...           2 years ago
  • 1.0.0-1.18                                ...           2 years ago
  • 1.0.0-1.17                                ...           2 years ago
  • 1.0.0-1.16                                ...           2 years ago
  • 1.0.0-1.15                                ...           2 years ago
  • 1.0.0-1.14                                ...           2 years ago
  • 1.0.0-1.13                                ...           2 years ago
  • 1.0.0-11                                ...           2 years ago
  • 1.0.0-1.12                                ...           2 years ago
  • 1.0.0-10                                ...           2 years ago
  • 1.0.0-9                                ...           3 years ago
  • 1.0.0-1.11                                ...           3 years ago
  • 1.0.0-1.10                                ...           3 years ago
  • 1.0.0-1.9                                ...           3 years ago
  • 1.0.0-1.8                                ...           3 years ago
  • 1.0.0-1.7                                ...           3 years ago
  • 1.0.0-1.6                                ...           3 years ago
  • 1.0.0-1.5                                ...           3 years ago
  • 1.0.0-1.4                                ...           3 years ago
  • 1.0.0-1.3                                ...           3 years ago
  • 1.0.0-1.2                                ...           3 years ago
  • 1.0.0-1.1                                ...           3 years ago
  • 1.0.0-beta.1.2                                ...           3 years ago
  • 1.0.0-beta.1.1                                ...           3 years ago
Maintainers (1)
Today 0
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 32
Dependencies (64)
Dev Dependencies (1)
Dependents (0)

Copyright 2014 - 2016 © taobao.org |