-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flow init to run as command not flag #2522
Conversation
- Call `npm run flow --init` won't create a .flowconfig file, it should be `npm run flow init`
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed. If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Does |
It does as it is the same as |
If dropping the |
Thanks for the explanation @Timer, new thing to learn everyday! I tested on npm 3.10.10, 4.6.1 and 5.0.3, same result: |
Neat! And yeah the |
Sorry to be a bother, but can you please make sure |
@@ -690,7 +690,7 @@ To add Flow to a Create React App project, follow these steps: | |||
|
|||
1. Run `npm install --save-dev flow-bin` (or `yarn add --dev flow-bin`). | |||
2. Add `"flow": "flow"` to the `scripts` section of your `package.json`. | |||
3. Run `npm run flow -- init` (or `yarn flow -- init`) to create a [`.flowconfig` file](https://flowtype.org/docs/advanced-configuration.html) in the root directory. | |||
3. Run `npm run flow init` (or `yarn flow init`) to create a [`.flowconfig` file](https://flowtype.org/docs/advanced-configuration.html) in the root directory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we can update the link to point to https://flow.org/en/docs/usage/#toc-initialize-your-project
it's explaining most of the steps better
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion! However, I believe the original purpose here is to show that we can start using flow with just 3 simple steps and the link is to explain what goes inside .flowconfig file. Fixing the command should be sufficient for my purpose of this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah I got it.
I also agree with your PR here because I think we should just follow
the instruction given by flow on its doc to make things simple and prevent confusion
No problem at all, it is the same case as |
Great, thanks so much! |
* Update Travis CI Node versions in User Guide (facebook#2454) Removed Node v4 (CRA only supports Node >= 6) * re-add storybook && update the documentation and links (facebook#2331) * re-add storybook && update the documentation and links * Change to new documentation domain * Prioritize index.css over the implicit App.css (facebook#2470) * Added NamedModulesPlugin in webpack.config.dev.js (facebook#2458) * Added NamedModulesPlugin in webpack.config.dev.js * Update webpack.config.dev.js * Unscope detect-port (facebook#2483) Resolves facebook#2481 * Update webpack links to point to webpack 2 (facebook#2492) * Update README.md to make links to webpack point to webpack.js.org instead insteade of webpack 1 webpack.githup.io * chore(templates): Move GitHub templates to hidden .github folder (facebook#2489) * Fix minor docs typo (facebook#2500) * Fix link to Storybook docs (facebook#2521) * Simplify flow init docs (facebook#2522) - Call `npm run flow --init` won't create a .flowconfig file, it should be `npm run flow init`
- Call `npm run flow --init` won't create a .flowconfig file, it should be `npm run flow init`
- Call `npm run flow --init` won't create a .flowconfig file, it should be `npm run flow init`
npm run flow --init
won't create a .flowconfig file, it should benpm run flow init