max-mapper / standard-format

converts your code into Standard JavaScript Format
264 stars 59 forks source link

stream format one file only #157

Closed gautaz closed 8 years ago

gautaz commented 8 years ago

Hello,

I probably missed something but I have tried different command line options of standard-format in order to comply with this vim-autoformat prerequisite:

The formatprogram must read the unformatted code from the standard input, and write the formatted code to the standard output.

This is detailed here.

Even when using the following syntax:

standard-format < /some/path/file.js

standard-format is still concatenating all the javascript files present in the current directory additionally with /some/path/file.js. So for now I did not find the right way to integrate standard-format with vim-autoformat.

Does someone have any suggestion on this particular subject ?

feross commented 8 years ago

You need to pass the argument - in order to signal stdin.

standard-format -

gautaz commented 8 years ago

@feross Thank you for the hint !

Perhaps it would be interesting to include this in the readme.md along with the other options?