Skip to content

TALLStackHub/js-beautify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NPM @latest npm NPM

JS Beautifier with blade

NPM stats

This's a js-beautify fork but with full support to Blade

The whole idea behind this package to beautify the blade files such as html with all configrations & rules. This package also support beautify js & css with the same API of original js-beautify

Installation

Install js-beautify-with-blade with npm globaly

  npm -g install js-beautify-with-blade

or as a node library locally per project

  npm install js-beautify-with-blade

Usage

Beside all the usage examples you can found at the orignal js-beautify.

You can use this package as blade beautifier

npx html-beautify resources/views/**/*.blade.php -r

run the above command in your project's root directory will beautify all the blade files

Features

  • Automatically Indents markup inside directives
  • Automatically add spacing to blade templating markers
  • Support all HTML Beautifier Options
  • To remove the space between @ and the directive set space_after_directive to false

License

MIT

Roadmap

  • Add indendt for @case
  • Support single custom directive
  • Add options to customize space between @ & directive

Contributing

Contributions are needed and always welcome!

Credits

Orignal package Credits

Thanks also to Jason Diamond, Patrick Hof, Nochum Sossonko, Andreas Schneider, Dave Vasilevsky, Vital Batmanov, Ron Baldwin, Gabriel Harrison, Chris J. Shull, Mathias Bynens, Vittorio Gambaletta and others.

Blade support

Many thanks to fzldn for the idea and his gist

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published