Giter VIP home page Giter VIP logo

watch-ng-libraries's Introduction

watch-ng-libraries

CLI to run ng apps using monorepo libraries. It parses angular.json and looks for module dependencies among libraries and application within angular monorepo. Then it builds dependecy map and build libraries in correct order to honor all dependecies. Project specified in serve command is then served using ng serve utilit from @angular/cli

In version 1.2.1 we added support for secondary entry points into ANG libraries support

Quick Example

watch-ng-libraries serve project -r -d /home/path/to/ang/project -p

watch-ng-libraries build project -r -d /home/path/to/ang/project -a --aot,--configuration,ivy

Command serve

Parameters

  • --libraries (-l): supplied list of libraries in chronological order instead of parsing the angular.json file
  • --directory (-d): working directory, defaults to current directory
  • --delete (-r): delete dist directory in project root
  • --detached (-p): runs the ng serve in detached console with full output.
  • --prod (-b): add custom options to ng build project --prod
  • --verbose (-v): detailed output from ngcc.
  • --ngccarguments (-a): colon delimited arguments that will be passed to ngcc. E.g ... -a --prod,--configuration,ivy will be passed as ng serve project --prod --configuration ivy
  • --memory (-m): set the node memory allocation (--max-old-space-size setting) for app served/build.

Command build

Parameters

  • --libraries (-l): supplied list of libraries in chronological order instead of parsing the angular.json file
  • --directory (-d): working directory, defaults to current directory
  • --delete (-r): delete dist directory in project root
  • --prod (-b): add custom options to ng build project --prod
  • --verbose (-v): detailed output from ngcc.
  • --ngccarguments (-a): colon delimited arguments that will be passed to ngcc. E.g ... -a --prod,--configuration,ivy will be passed as ng build project --prod --configuration ivy
  • --memory (-m): set the node memory allocation (--max-old-space-size setting) for app served/build.
  • --omit (-o): builds all dependency libraries, but will not build the application. Needed in case when application needs extra build configurations.

watch-ng-libraries's People

Contributors

mareklesko avatar ondrashx avatar

Stargazers

J. Degand avatar Erick Xavier avatar

Watchers

 avatar

Forkers

ondrashx

watch-ng-libraries's Issues

The -a option won't run custom configurations

I'm trying the -a like this:

watch-ng-libraries serve myproject -a --configuration,customconfig -l @modules/mod1,@modules/mod2,@modules/mod3 -d ./

But it's not working at all.

The intent of the command I'm using is to run something like this:

ng build @modules/mod1 --watch
ng build @modules/mod2 --watch
ng build @modules/mod3 --watch
ng serve myproject --configuration customconfig

But checking my project on the browser, the customconfig is not being used at all.

ng serve myproject

If I try by myself run the command bellow, it works fine.

ng serve myproject --configuration customconfig

Error reporting

Hi, I'm having an error when the watch-ng-libraries tries to report an error. It's showing this, instead:

C:\Users\username\AppData\Roaming\nvm\v14.17.3\node_modules\@mareklesko\watch-ng-libraries\node_modules\rxjs\internal\util\hostReportError.js:4
    setTimeout(function () { throw err; }, 0);
                             ^

RangeError: Invalid array length
    at C:\Users\USERNAME\AppData\Roaming\nvm\v14.17.3\node_modules\@mareklesko\watch-ng-libraries\lib\logger\logger.js:52:48
    at Array.forEach (<anonymous>)
    at Logger.log (C:\Users\USERNAME\AppData\Roaming\nvm\v14.17.3\node_modules\@mareklesko\watch-ng-libraries\lib\logger\logger.js:51:37)
    at SafeSubscriber._next (C:\Users\USERNAME\AppData\Roaming\nvm\v14.17.3\node_modules\@mareklesko\watch-ng-libraries\lib\logger\logger.js:17:92)
    at SafeSubscriber.__tryOrUnsub (C:\Users\USERNAME\AppData\Roaming\nvm\v14.17.3\node_modules\@mareklesko\watch-ng-libraries\node_modules\rxjs\internal\Subscriber.js:205:16)
    at SafeSubscriber.next (C:\Users\USERNAME\AppData\Roaming\nvm\v14.17.3\node_modules\@mareklesko\watch-ng-libraries\node_modules\rxjs\internal\Subscriber.js:143:22)
    at Subscriber._next (C:\Users\USERNAME\AppData\Roaming\nvm\v14.17.3\node_modules\@mareklesko\watch-ng-libraries\node_modules\rxjs\internal\Subscriber.js:89:26)
    at Subscriber.next (C:\Users\USERNAME\AppData\Roaming\nvm\v14.17.3\node_modules\@mareklesko\watch-ng-libraries\node_modules\rxjs\internal\Subscriber.js:66:18)
    at BehaviorSubject.Subject.next (C:\Users\USERNAME\AppData\Roaming\nvm\v14.17.3\node_modules\@mareklesko\watch-ng-libraries\node_modules\rxjs\internal\Subject.js:60:25)
    at BehaviorSubject.next (C:\Users\USERNAME\AppData\Roaming\nvm\v14.17.3\node_modules\@mareklesko\watch-ng-libraries\node_modules\rxjs\internal\BehaviorSubject.js:51:31)

Environment:

Windows 10 Pro

$ ng --version

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 12.2.2
Node: 14.17.3
Package Manager: npm 6.14.13
OS: win32 x64

Angular: 12.2.2
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, material, material-moment-adapter, platform-browser
... platform-browser-dynamic, router, service-worker

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1202.2
@angular-devkit/build-angular   12.2.2
@angular-devkit/core            12.2.2
@angular-devkit/schematics      12.2.2
@schematics/angular             12.2.2
ng-packagr                      12.2.0
rxjs                            6.6.7
typescript                      4.3.5

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.