Skip to main content

This tool provides support in the conversion process of converting a Flow component to TypeScript. It takes the trivial work out of the conversion.

Project description

FlowTees

Purpose

This tool provides support in the conversion process of converting a Flow component to TypeScript. It takes the trivial work out of the conversion. These are just floaties to help you but won't totally convert your component.

Note: Tool is specifically made for Atlaskit.

Features

  • Renames files to tsx/ts
  • Ignores node_modules
  • Removing flow decorators (@flow, $StringLitteral, $FlowFixMe)
  • Remove type keyword from exports and imports
  • Renames type keyword to interface keyword when applicable and can handle extends
  • Configures package.json and creates tsconfig.json files

Usage

asciicast

FlowTees is a command line application, called flowtees, the application is used before beginning the conversion process. It assumes that no work has been started on the component yet.

To begin, run the following command:

$ flowtees [directory/to/component]

e.g. say you are converting the select component, then the command would look like this:

$ flowtees ~/src/atlaskit-mk-2/packages/core/select

The program will begin analyzing the js files in the directory and do a dry run to find only compatible files to convert. The compatible files will be listed in green while incompatible files will be shown in red.

After processing the files, you will get a prompt asking whether you want to also include the build config files for TS. This helps to create the appropriate tsconfig.json files in the component directory and also modify the the package.json file so it points to the correct index.ts file.

Installation

$ pip install flowtees

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for flowtees, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size flowtees-0.1-py3-none-any.whl (6.8 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page