marksmccann / node-sass-extra

A drop-in replacement for node-sass' Node API that adds support for globs, promises and more.
MIT License
2 stars 1 forks source link

Emitter: Logs/Stats #30

Open marksmccann opened 5 years ago

marksmccann commented 5 years ago

Do we want to provide the ability to enable/disable logging and/or statistics from the command-line tool? The node-sass CLI already has a quiet prop, we could tie into that when wanting to prevent the logs from displaying. For example, we could display the files that were compiled; their source and output.

> Compiled /path/to/src/my-file.scss -> /path/to/dest/my-file.css
...
> Created /path/to/dest/my-file.css.map

We could also potentially provide statistics when a job is completed. This could be handy for debugging. Something like –

> Job Completed Successfully
> 24 source files were compiled into 20 output files
> 20 source map files were generated
marksmccann commented 5 years ago

node-sass has an emitter function we should emulate to log messages and more: https://github.com/sass/node-sass/blob/master/bin/node-sass#L145