1.0.0-alpha.3 • Published 4 years ago

@angular-buddies/prettier v1.0.0-alpha.3

Weekly downloads
402
License
MIT
Repository
github
Last release
4 years ago

@angular-buddies/prettier

Your buddy who knows how to make your code pretty using Prettier.

Easily add, configure, and use Prettier in your project. Extends the functionalities of Angular CLI, but also works without it, even for non-angular projects.

A tool from the Angular Buddies project.

Buddy cleaning a window

Add Prettier to your project

This buddy will handle everything for you : Prettier dependencies,scripts and default configurations.

with Angular Cli

ng add @angular-buddies/prettier

That all! :ok_hand:

without Angular CLI

  1. install the package, locally or globally:

npm i [-g] @angular-buddies/prettier\ or yarn [global] add @angular-buddies/prettier

  1. run the prettier-init schematic in your project

Schematics

This package provide angular-devkit schematics in order to enhance prettier integration in your project.

If you are using Angular, we recommand to use Angular CLI. But if you don't, that ok: this buddy covered it for you too.

See this package's schematics documentation for more informations.

How To run a Schematic

Using Angular CLI

ng generate [@angular-buddies/prettier:]<schematic>

FYI: you can remove this collection (@angular-buddies/prettier:) from this command if you choose to set this package as your default collection during its initialisation.

Without Angular CLI

You'll need to install @angular-devkit/schematics-cli before anything:\ npm i [-g] @angular-dekit/schematics-cli

schematics @angular-buddies/prettier:<schematic>

Scripts

Scripts are generated by the prettier-init schematic. You'll need to run it before using this scripts.

Prettify

Run prettier on all your workspace files.

Command : npm run prettify

Motivation

Originally, the first idea of this project was ased on the comment added to an associated issue in angular-cli.