Repository navigation
Add --init command - #1258
Closed
vutran wants to merge 2 commits into
Closed
Add --init command#1258vutran wants to merge 2 commits into
--init command#1258vutran wants to merge 2 commits into
Conversation
Member
|
I don't think we want to be in the business of being a CLI for initializing apps. You should use another tool for bootstrapping your app, like yeoman, or something built to do this. This project is a simple CLI/API to prettify your code, and not much else. |
Contributor
Author
|
Sounds good. Wasn't sure the extent of the goals of this tool. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue: Having to create new projects and copy/paste the same
prettierinto apackage.jsonon each new project becomes very tedious.This PR will add a simple
--initcommand that will initialize the current working directory withprettier. This will make it really easy for beginners to get started withprettier.In addition, it will attempt to read from an existing
.editorconfig(#42) file in the directory in which the script is ran. This will void our need to have a custom config file (#62) just for prettier since there's no shortage of dot/rc files.package.jsonin cwd with aprettiernpm script.prettier --write '{**/*.js}'".editorconfigand specify the indentation width/style.indent_style->--use-tabsindent_size-->--tab-widthUsage:
$ cd myproject $ prettier --init