GithubHelp home page GithubHelp logo

angular-fast-serve's Introduction

Faster Serve for Angular Development

This repository is a basic Schematic implementation that is based on this https://javascript-conference.com/blog/how-to-create-your-own-angular-schematics/.

I created this repo so that you can automatically create your Angular projects with predefined settings. In this script, I've pre-configured a config that allows for a faster ng serve. The script can also be changed to pre-load and pre-configure anything else you want for your new angular projects.

Setup

To use locally,

  1. git clone this repository to the folder where you create your projects
  2. sudo npm install -g @angular-devkit/schematics-cli && sudo npm install -g @schematics/angular
  3. cd angular-fast-serve
  4. npm install
  5. npm run build
  6. cd ..
  7. Edit the package.json in this parent folder (your projects folder), if you don't have a package.json there, use npm init to create a basic one and add the following to this file:
"scripts": {
    "test": "schematics ./angular-fast-serve/src/collection.json:fast --debug=false"
  }
  1. now you can run npm test in your projects folder to create a new angular project with your custom configuration

  2. inside the new project you can run npm start to run the following:

ng serve --live-reload=false -c fast -o

  "fast": {
            "optimization": false,
            "outputHashing": "none",
            "sourceMap": false,
            "extractCss": false,
            "namedChunks": false,
            "showCircularDependencies": true,
            "aot": true,
            "extractLicenses": false,
            "statsJson": false,
            "progress": false,
            "vendorChunk": true,
            "buildOptimizer": false
  }

This allows your serve to be faster when developing in the browser.

That's it!

angular-fast-serve's People

Contributors

maulwurfde avatar

Watchers

James Cloos avatar  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.