Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kapelianovych/gulp-flow-remove-types2
Gulp plugin for removing Flow types
https://github.com/kapelianovych/gulp-flow-remove-types2
flow-remove-types gulp gulp-plugin
Last synced: 22 days ago
JSON representation
Gulp plugin for removing Flow types
- Host: GitHub
- URL: https://github.com/kapelianovych/gulp-flow-remove-types2
- Owner: Kapelianovych
- License: other
- Created: 2020-01-08T08:57:43.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-08-02T06:32:08.000Z (over 3 years ago)
- Last Synced: 2024-12-14T00:06:20.614Z (23 days ago)
- Topics: flow-remove-types, gulp, gulp-plugin
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/gulp-flow-remove-types2
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# gulp-flow-remove-types2
Gulp plugin for [flow-remove-types](https://github.com/flowtype/flow-remove-types).
This plugin is just a fork of [gulp-flow-remove-types](https://github.com/Wain-PC/gulp-flow-remove-types) plugin - the last one is outdated and doesn't work for me. Also this plugin is improved according to [official requirements](https://github.com/gulpjs/gulp/blob/master/docs/writing-a-plugin/guidelines.md).
## Installation
Install the package:
- npm `npm i gulp-flow-remove-types2 --save-dev`
- yarn `yarn add gulp-flow-remove-types2 --dev`## Usage
```javascript
const { src, dest } = require('gulp')
const flowRemoveTypes = require('gulp-flow-remove-types2')src('file.js')
.pipe(flowRemoveTypes())
.pipe(dest('dist'))
```## Options
### `pretty`
Type: `boolean` Default: `false`
By default, [flow-remove-types](https://github.com/flowtype/flow-remove-types) replaces Flow type definitions with whitespaces.
Pass `{pretty: true}` if you want more condensed output (no whitespaces).
##### Example
```javascript
src('file.js')
.pipe(flowRemoveTypes({
pretty: true
}))
.pipe(dest('dist'))
```### `sourceMap`
Type: `boolean` Default: `false`
If set to `true` gulp will additionally output `your_file_name.js.map` file to the stream.
##### Example
```javascript
src('file.js')
.pipe(flowRemoveTypes({
sourceMap: true
}))
.pipe(dest('dist')); //This will output both file.js and file.js.map
```