jscheid / prettier.el

Prettier code formatting for Emacs.
GNU General Public License v3.0
172 stars 12 forks source link

Is README.md out of date regarding prettier installation? #93

Closed aspiers closed 3 years ago

aspiers commented 3 years ago

The README.md says:

The Prettier package needs to be installed inside your npm package, or globally with either npm or yarn. Version 1.6 is the minimum requirement but it's recommended to use the latest version in order to get access to all parsers, features and bugfixes.

However, the docstring for prettier--create-process says:

The process is launched by running node with a minified version of bootstrap.js as a script provided on the command line; this then loads a minified version of prettier-el.js from stdin.

I can certainly see the minified version being used in my case, and I can only see that version being launched in the source code too, which leads me to suspect that the README.md is out of date. Is that right?

Bearing in mind issues like the one I mentioned in #92 where I am getting different results between prettier.el and the prettier I've installed via yarn, it would actually be helpful to be able to choose which prettier executable to use.

jscheid commented 3 years ago

I don't think I follow, is it possible there is confusion between prettier-el.js -- a helper file that ships with this package -- on the one hand, and the prettier npm package on the other? As far as I can see the README is still correct -- if it isn't then it's the code that needs fixing, not the documentation.

aspiers commented 3 years ago

@jscheid commented on September 20, 2021 12:01 AM:

I don't think I follow, is it possible there is confusion between prettier-el.js -- a helper file that ships with this package -- on the one hand, and the prettier npm package on the other?

Ah yes - sorry. And now I find this comment I wrote last year and start to feel worried that my memory is deteriorating with age...