vingorius / pug-beautify

Pug(former jade) beautify
19 stars 6 forks source link

[Suggestion] Add a cli #1

Closed sbdchd closed 8 years ago

sbdchd commented 8 years ago

I am not sure if you had any places to create a command line interface for pug-beautify, but I think it would be a great feature.

vingorius commented 8 years ago

That's good idea. Is there a good example for reference ?

sbdchd commented 8 years ago

I think the pug-cli might be helpful.

vingorius commented 8 years ago

Tks @sbdchd , i'll try it.

vingorius commented 8 years ago

How to design the input/output ? overwrite the original file ? is it little bit dangerous? or just use STDOUT. how's your idea?

sbdchd commented 8 years ago

I think it would make sense to have it default to stdout and have an optional flag to overwrite the original file.

On Tuesday, March 8, 2016, Kim Jongho notifications@github.com wrote:

How to design the input/output ? overwrite the original file ? is it little bit dangerous? or just use STDOUT. how's your idea?

— Reply to this email directly or view it on GitHub https://github.com/vingorius/pug-beautify/issues/1#issuecomment-194034595 .

vingorius commented 8 years ago
~$> pug-beautifier --help
usage: pug-beautify [options] file
option:-s, --fillspace <tab_size>,  fill <tab_size> spaces rather than tab, default tab.
option:-d, --omitdiv, omit div tag, default not.
option:-o,--overwrite, overwrite input file, default stdout.

That's psudo example.

vingorius commented 8 years ago

I open a new repository. and move #1 to there.

vingorius commented 8 years ago

Refer a new repository.