Giter VIP home page Giter VIP logo

generator-ngx-rocket's Introduction

๐Ÿš€ generator-ngx-rocket

NPM version Build status Node version XO code style Downloads

ngx-rocket logo

Web project starter kit including modern tools and workflow based on angular-cli, best practices from the community, a scalable base template and a good learning base.

See generated project example here.

Benefits versus bare angular-cli projects

  • A complete starter template: example app structure tailored for scalability, with examples and boilerplate code for every common thing needed in enterprise projects, such as unit tests, routing, authentication, HTTPS service extensions, i18n support with dynamic language change and automatic user language detection...

  • Improved tooling: SCSS & HTML linting, stricter TSLint rules, markdown-based local wiki server for documentation, automated localizable strings extraction, corporate proxy support, Cordova integration

  • Extensive base documentation: coding guides for TypeScript/SCSS/HTML, Angular onboarding guide, corporate proxy and other tools configuration and usage...

  • Ready-to-use UI components: focus on your app, not on the stack! Choose between a Bootstrap 4 or Ionic based UI with nicely looking, responsive starter templates

  • Mobile app support: choose between a web app, a mobile app (using Cordova) or both using the same code base

  • API proxy example setup: develop and debug faster using any remote server

  • Generator output customization: with the provided add-on support, start multiple projects even faster by plugging in additions that fit your needs, such as your enterprise theme, SSO authentication, services integrations...

And there's even more! See What's in the box for more details.

Getting started

Using ngX-Rocket CLI

  1. Install required tools:
npm install -g @ngx-rocket/cli
  1. Create your application:
ngx new

Using Yeoman

  1. Install required tools:
npm install -g yo generator-ngx-rocket
  1. Create your application:
yo ngx-rocket

Project structure

dist/                        app production build
docs/                        project docs and coding guides
e2e/                         end-to-end tests
src/                         project source code
|- app/                      app components
|  |- core/                  core module (singleton services and single-use components)
|  |- shared/                shared module  (common components, directives and pipes)
|  |- app.component.*        app root component (shell)
|  |- app.module.ts          app root module definition
|  |- app-routing.module.ts  app routes
|  +- ...                    additional modules and components
|- assets/                   app assets (images, fonts, sounds...)
|- environments/             values for various build environments
|- theme/                    app global scss variables and theme
|- translations/             translations files
|- index.html                html entry point
|- main.scss                 global style entry point
|- main.ts                   app entry point
|- polyfills.ts              polyfills needed by Angular
+- test.ts                   unit tests entry point
reports/                     test and coverage reports
proxy.conf.js                backend proxy configuration

Main tasks

Task automation is based on NPM scripts.

Task Description
npm start Run development server on http://localhost:4200/
npm run build [-- --env=prod] Lint code and build web app for production in dist/ folder
npm test Run unit tests via Karma in watch mode
npm run test:ci Lint code and run unit tests once for continuous integration
npm run e2e Run e2e tests using Protractor
npm run lint Lint code
npm run translations:extract Extract strings from code and templates to src/app/translations/template.json
npm run docs Display project documentation

Additional tasks for Cordova-based projects:

Task Description
npm run cordova:prepare Prepare for building mobile app (restore Cordova platforms and plugins)
npm run cordova:run <ios/android> [--device] Run app on target platform device or simulator
npm run cordova:build [-- --env=prod] Build mobile app for production in dist/ folder
npm run cordova:clean Removes www/, platforms/ and plugins/ folders

When building the application, you can specify the target environment using the additional flag --env <name> (do not forget to prepend -- to pass arguments to npm scripts).

The default build environment is prod.

Development server

Run npm start for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files. You should not use ng serve directly, as it does not use the backend proxy configuration by default.

Code scaffolding

Run npm run generate -- component <name> to generate a new component. You can also use npm run generate -- directive|pipe|service|class|module.

If you have installed angular-cli globally with npm install -g @angular/cli, you can also use the command ng generate directly.

What's in the box

starter kit

The app template is based on HTML5, TypeScript and Sass. The translation files use the common JSON format.

Tools

Development, build and quality processes are based on angular-cli and NPM scripts, which includes:

Native mobile application bundling is based on Cordova. Alternative enhanced web views are also supported:

Libraries

Coding guides

Other documentation

Contributing

See contributing guide

License

MIT

generator-ngx-rocket's People

Contributors

angular-cli avatar sinedied avatar

Watchers

 avatar

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.