php自动选择物体轮廓,生成代码的轮廓图像

Create a visual representation of your code

68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f7370617469652f636f64652d6f75746c696e65722e7376673f7374796c653d666c61742d73717561726568747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7370617469652f636f64652d6f75746c696e65722e7376673f7374796c653d666c61742d73717561726568747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3134313431333239362f736869656c643f6272616e63683d6d617374657268747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7370617469652f636f64652d6f75746c696e65722e7376673f7374796c653d666c61742d737175617265

You're reading code on a daily basis, code should be optimised for that. This tool helps you visualise how the code in your project looks, and might be a trigger to better structure your files.

More information about the visual perception of code here: https://www.stitcher.io/blog/visual-perception-of-code.

Support us

Learn how to create a package like this one, by watching our premium video course:

f5a7e6def3c8cda25268f7b20310a1b9.png

We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.

Installation

spatie/browsershot is required to generate images. Please refer to the Browsershot documentation for all details, most important is to install puppeteer.

npm install puppeteer --global

You can install the package via composer:

composer global require spatie/code-outliner

Usage

code-outliner [--output=] [--extensions=]

Outlining a single file

Pass a single file to the command, and you'll get output like this.

79f813eb304e64b198f43c5e3cbc4df2.png

Overlaying multiple files

Pass a directory path to the command, and it'll overlay all files on top of each other. The darker areas represent areas where there's more code across all files.

11dcd1314f1c2570c11ac2961d4c2244.png

Filtering extensions

By default, PHP files will be scanned. You're able to specify other and multiple extensions with the --extensions option.

code-outliner --extensions="html,twig"

Security

If you discover any security related issues, please email freek@spatie.be instead of using the issue tracker.

Postcardware

You're free to use this package, but if it makes it to your production environment we highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using.

Our address is: Spatie, Samberstraat 69D, 2060 Antwerp, Belgium.

We publish all received postcards on our company website.

Credits

License

The MIT License (MIT). Please see License File for more information.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值