Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

generator-ngx-app

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

generator-ngx-app

Angular 2+ enterprise-grade project generator based on angular-cli with best practices from the community, a scalable starter template and a good learning base.

  • 1.1.0
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

generator-ngx-app

NPM version Build status Downloads

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

  • Quickstart a project in seconds and focus on features, not on frameworks or tools

  • Industrial-grade tools, ready for usage in a continuous integration environment and DevOps

  • Scalable architecture with base app template including example components, services and tests

logo

Getting started

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

Project structure

dist/                        compiled version
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.

TasksDescription
npm startRun development server on http://localhost:4200/
npm run build [-- --env=prod]Lint code and build app for production in dist/ folder
npm testRun unit tests via Karma in watch mode
npm run test:ciLint code and run unit tests once for continuous integration
npm run e2eRun e2e tests using Protractor
npm run lintLint code
npm run translations:extractExtract strings from code and templates to src/app/translations/template.json
npm run docsDisplay project documentation

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

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:

Libraries
Coding guides
Other documentation

License

MIT

Keywords

FAQs

Package last updated on 16 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc