GithubHelp home page GithubHelp logo

arunselvakumar / ng-essentials Goto Github PK

View Code? Open in Web Editor NEW

This project forked from blumk/ng-essentials

0.0 1.0 0.0 1.69 MB

An essentials schematics for new Angular applications

JavaScript 4.69% TypeScript 93.40% HTML 1.81% CSS 0.10%

ng-essentials's Introduction

ng-essentials

Adds better defaults to a new Angular application generated with the Angular-CLI. ng-essentials is heavily inspired by the following schematics:

It includes many of the ideas of the following blog post, also written by Martin Hotell: Use React tools for better Angular apps.

Usage

This schematic uses the ng add command to add it's value to a new Angular application:

ng add @froko/ng-essentials

The above command does the following:

  • Updates all npm packages to their latest stable versions
  • Installs prettier for advanced code formatting
  • Installs husky for format checking during git commit
  • Adds Angular debugging support for Visual Studio Code
  • Adds an ENV_PROVIDERS configuration array with the current environment name and a base URL to the environment.ts and environment.prod.ts files and provides this array in the AppModules's providers array.
  • Removes e2e testing functionality with protractor. See below how to add better alternatives. Hint: Please remove the e2e folder by yourself since I haven't found out yet how to remove whole directories with the schematics tools.

ng-essentials comes with some configuration switches to add even more value:

  • --jest removes testing functionality with jasmine and karma and replaces it with jest using @angular-builders/jest.

  • --cypress adds e2e testing functionality with Cypress.io. Please note that ng e2e won't work anymore. Use npm run cypress or yarn cypress instead.

  • --testcafe adds e2e testing functionality with Testcafe. Please note that ng e2e won't work anymore. Use npm run testcafe or yarn testcafe instead.

Adding a new library with jest support

This schematic enhances the creation of a new library when the schematic was previously installed with the --jest option. By running

ng generate lib myAwesomeLib

it will delete the karma/jasmine configuration and add jest support for the new library as well.

Adding a new application with jest support

This schematic enhances the creation of a new application when the schematic was previously installed with the --jest option. By running

ng generate app myAwesomeApp

it will delete the karma/jasmine configuration and add jest support for the new application as well. Keep in mind that there is no more e2e support for protractor. So remove the e2e folder of the new application since it has no value anymore.

ng-essentials's People

Contributors

froko 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.