Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gen-flow-files

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gen-flow-files

[![npm version](https://img.shields.io/npm/v/gen-flow-files.svg)](https://www.npmjs.com/package/gen-flow-files) [![npm downloads](https://img.shields.io/npm/dt/gen-flow-files.svg)](https://www.npmjs.com/package/gen-flow-files)

  • 0.5.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.2K
increased by106.17%
Maintainers
1
Weekly downloads
 
Created
Source

gen-flow-files

npm version npm downloads

This is a script which finds .js files with @flow annotation, extract flow definitions and save to specific folder.

As example, <inputDir>/example.js

// @flow

extract function foo(arg1: number, arg2: string): string {
    // some code here
}

will be transformed to <outputDir>/example.js.flow:

// @flow

declare extract function foo(arg1: number, arg2: string): string;
Sponsored by Lessmess

Installation

Install it with yarn:

yarn add gen-flow-files

Or with npm:

npm i gen-flow-files --save

Usage

As part of build process
scripts": {
    ...
    "flow": "flow",
    "build:flow": "gen-flow-files src --out-dir dist",
    ...
  },

transfrom all .js files from src to .js.flow files and save them at dist.

As command
npx gen-flow-files <inputDir> --out-dir <outputDir>

transfrom all .js files from <inputDir> to .js.flow files and save them at <outputDir>.

FAQs

Package last updated on 27 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc