Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kube/gulp-flowgen

Gulp plugin for Flowgen: Generate Flowtype definition files from TypeScript.
https://github.com/kube/gulp-flowgen

flowgen flowtype gulp gulpplugin typescript

Last synced: 2 days ago
JSON representation

Gulp plugin for Flowgen: Generate Flowtype definition files from TypeScript.

Awesome Lists containing this project

README

        

Gulp Flowgen
============

Gulp Plugin for [Flowgen](https://github.com/joarwilk/flowgen).

TypeScript Setup Example
------------------------

```js
const gulp = require('gulp')
const merge = require('merge-stream')
const typescript = require('gulp-typescript')
const flowgen = require('gulp-flowgen')

const tsOptions = require('./tsconfig.json').compilerOptions
const tsProject = typescript.createProject(tsOptions)

const build = () => {
const tsResult =
gulp.src('**/*.ts')
.pipe(tsProject())

// Merge JavaScript output, TypeScript definition files, and a Flow definition files created from the TypeScript dts stream
return merge(
tsResult.js,
tsResult.dts,
tsResult.dts.pipe(flowgen())
)
.pipe(gulp.dest(tsOptions.outDir))
}
```