This repository contains a yarn 2 (aka berry) plugin for angular development.
yarn plugin import https://github.com/bgotink/yarn-plugin-angular/raw/latest/bin/%40yarnpkg/plugin-angular.js
This plugin makes the Angular CLI available in your entire monorepository.
Once installed in the root package.json
file, running ng
will be available everywhere:
yarn ng
in the entire monorepository, regardless of whether the current package has a dependency on @angular/cli
.ng
in scripts in the scripts
section of any package.json
of your monorepository.This plugins adds a powerful interactive update command. Try it out using yarn ng update-interactive
.
Some of the features of this command:
This plugin's PnP support is experimental. It should work for angular 8.3, 9, 10, and 11, but only parts of angular have been tested so far. If you're not using PnP, everything should work as is.
ng build
, ng test
, ng e2e
, ng xi18n
etc)ng generate
)ng update
)@angular-devkit/build-angular:browser
)@angular-devkit/build-angular:dev-server
)@angular-devkit/build-angular:karma
)@angular-devkit/build-angular:protractor
)When making changes, use yarn build
to build the plugin. This'll create two
files.
bundles/@yarnpkg/plugin-angular.js
you'll find the minified bundle, similar to the released file in the bin
folder.bundles/@yarnpkg/plugin-angular.dev.js
is not minified. This is useful when debugging the plugin, as it keeps error stacktraces readable and it allows for easier step-through debugging via the Chrome inspector.The patchfiles are zipped and included in the src/patches
folder. Use yarn generate-patches
before yarn build
to update these zipped patches.
See LICENSE.md