Gulp plugin for flow-remove-types.
Install the package:
- npm
npm install --save gulp-flow-remove-types
- yarn
yarn add gulp-flow-remove-types
var gulp = require('gulp'),
flowRemoveTypes = require('gulp-flow-remove-types');
gulp.src('file.js')
.pipe(flowRemoveTypes())
.pipe(gulp.dest('dist'));
Type: boolean
Default: false
By default, flow-remove-types replaces Flow type definitions with whitespaces.
Pass {pretty: true}
if you want more condensed output (no whitespaces).
gulp.src('file.js')
.pipe(flowRemoveTypes({
pretty: true
}))
.pipe(gulp.dest('dist'));
Type: boolean
Default: false
If set to true
gulp will additionally output your_file_name.js.map
file to the stream.
gulp.src('file.js')
.pipe(flowRemoveTypes({
sourceMap: true
}))
.pipe(gulp.dest('dist')); //This will output both file.js and file.js.map