flow-to-typescript-codemod
Codemod Stripe used to migrate 6.5m+ lines of code from Flow to TypeScript
파일 탐색기
최종 버전 다운로드 (.zip)- arguments.ts
- yargs.ts
- type-at-pos.ts
- annotate-params.test.ts
- annotate-params.ts
- execute-type-at-pos.ts
- type-at-pos.test.ts
- type-at-pos.ts
- components-with-spreads.ts
- get-component-type.ts
- index.ts
- jsx-spread.test.ts
- jsx-spread.ts
- function-parameter.ts
- metadata.ts
- object-members.ts
- qualified-identifier.ts
- type-parameter.ts
- type.ts
- common.ts
- configurable-type-provider.ts
- handle-async-function-return-type.ts
- matchers.ts
- testing.ts
- type-mappings.ts
- add-watermark.test.ts
- add-watermark.ts
- annotate-no-flow.ts
- declarations.test.ts
- declarations.ts
- default-transformer-chain.ts
- expressions.test.ts
- expressions.ts
- function-visitor.test.ts
- function-visitor.ts
- jsx.test.ts
- jsx.ts
- move-imports.test.ts
- move-imports.ts
- no-flow-transformer-chain.ts
- patterns.test.ts
- patterns.ts
- private-types.test.ts
- private-types.ts
- remove-flow-comments.test.ts
- remove-flow-comments.ts
- transform-runners.ts
- transformer.d.ts
- type-annotations.test.ts
- type-annotations.ts
- auto-import.test.ts
- export.ts
- needs-imports.ts
- tsconfig.json
- index.ts
- index.ts
- fix-type-exports.test.ts.snap
- fix-type-exports.test.ts
- test-input.ts
- tsconfig.json
- index.ts
- index.ts
- sorting.test.ts
- auto-suppress.test.ts.snap
- remove-unused.test.ts.snap
- auto-suppress.test.ts
- remove-unused.test.ts
- test-input.ts
- tsconfig.json
- auto-suppress.ts
- diagnostic-to-description.ts
- remove-unused.ts
- shared.ts
- build-diagnostic-message-filter.ts
- get-import-named.ts
- insuppressible-errors.ts
- state.ts
- ts-node-traversal.ts
- csv-formatter.ts
- json-formatter.ts
- std-out-formatter.ts
- types.ts
- index.ts
- migration-reporter.test.ts
- migration-reporter.ts
- find-flow-files.ts
- flow-header-removal.test.ts
- logger.ts
- process-batch.ts
- run-primary-async.ts
- run-setup-command.ts
- run-transforms.ts
- run-worker-async.ts
- state.ts
- index.ts
- install-typescript.ts
- index.ts
- suggest-types.ts
- index.ts
- ts-config.ts
- regression.test.ts.snap
- regression.test.ts
- jsx-fragment.tsx
- tsconfig.json
- .flowconfig
- flow_typescript_differences.js
- force-jsx.js
- no-annotation.js
- no-flow.js
- obj-const.js
- index.d.ts
- index.ts
- .eslintrc
- .gitignore
- .npmrc
- .prettierignore
- bin.js
- esBuild.js
- flow.d.ts
- jest.config.js
- LICENSE
- llama.png
- NOTES.md
- package.json
- README.md
- tsconfig.json
- yarn.lock
# 설치 가이드
1. 코드 내려받기
git clone https://github.com/stripe-archive/flow-to-typescript-codemod
깃허브에서 프로젝트 코드 전체를 내 컴퓨터로 내려받습니다.
cd flow-to-typescript-codemod
방금 내려받은 프로젝트 폴더 안으로 이동합니다.
2. Node.js
쉬움 추천사전 준비물
yarn
package.json에 명시된 라이브러리들을 내려받아 설치합니다.
yarn typescriptify convert -p ../path/to/your/codebase # Run in 'dry-run' without writing files
이 명령어를 터미널에 그대로 입력해 실행하세요.
yarn typescriptify convert -p ../path/to/your/codebase --write --delete # Write converted files and delete Flow source
이 명령어를 터미널에 그대로 입력해 실행하세요.
yarn typescriptify fix --autoSuppressErrors -p ../path/to/your/codebase --config ../path/to/your/codebase/tsconfig.json
이 명령어를 터미널에 그대로 입력해 실행하세요.
yarn typescriptify convert --path <path to source directory>
이 명령어를 터미널에 그대로 입력해 실행하세요.
명령어 실행 후 터미널에 나타나는 주소(보통 http://localhost:3000 형태)를 브라우저에서 열어보세요.
이 레포의 README에 적힌 실제 명령어를 그대로 가져왔습니다.
// repository documentation
Was this content helpful?
(0 ratings)
