Skip to main content

This tool provides support in the conversion process of converting AtlasKit Flow components 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 AtlasKit Flow components 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.

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

If you only have Python3 installed on your computer then the following command will install the program:

$ pip install flowtees

If you have both Python2 and Python3 installed then the following command will be more suitable:

$ pip3 install flowtees

Releases

0.1.5 (30 July 2019)

  • Updated build file to extend on renamed tsconfig.json

0.1.4 (24 May 2019)

  • UPDATE! No auto conversion of import React from 'react' will be made by default to reflect on choice to standardize on non-namespace import, however existing --react-namespace will remain in place

0.1.3 (23 May 2019)

  • Fixed bug with folders with a single file not listed in files to process
  • NEW! Auto conversion of import React from 'react'; to import * as React from 'react'; to avoid future issues. (Thi can be turned off with --react-namespace option)
  • NEW! Individual file conversions can be done by pointing to a js file

0.1.2 (20 May 2019)

  • Updated build tsconfig.json
  • Support for emotion jsx keywords

0.1 (Initial release) (15 May 2019)

  • 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

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

flowtees-0.1.5-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file flowtees-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: flowtees-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.5.3

File hashes

Hashes for flowtees-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 572118411f2acab99adc4cf15d60cf6d61f72be3530fb66af25a03ac992a65ca
MD5 f49e6004f67ee6e0b491a11c9dd4b40c
BLAKE2b-256 a54a49abe5a986609ff1c119e3cb9d38be5b99a954dd9b3087483a4be836dc72

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page