1 | # flow-copy-source
|
2 |
|
3 | [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/Macil/flow-copy-source/blob/master/LICENSE.txt) [![npm version](https://img.shields.io/npm/v/flow-copy-source.svg?style=flat)](https://www.npmjs.com/package/flow-copy-source) [![CircleCI Status](https://circleci.com/gh/Macil/flow-copy-source.svg?style=shield)](https://circleci.com/gh/Macil/flow-copy-source) [![Greenkeeper badge](https://badges.greenkeeper.io/Macil/flow-copy-source.svg)](https://greenkeeper.io/)
|
4 |
|
5 | This is a simple script which finds all .js, .jsx, and .mjs files in one or
|
6 | more source directories, and copies them into a destination directory with the
|
7 | .flow suffix appended to the filename.
|
8 |
|
9 | This is intended to be used as a build step for Flow-typed Javascript projects
|
10 | so that the original typed source files can be placed in the same directory as
|
11 | the transpiled code, so that Flow can use the type definitions in the original
|
12 | source code.
|
13 |
|
14 | ```
|
15 | Usage: bin/flow-copy-source.js [-v|--verbose] [-w|--watch] [-i PATTERN]... SRC... DEST
|
16 |
|
17 | Options:
|
18 | -v, --verbose Show changes [boolean]
|
19 | -w, --watch Re-copy files on change [boolean]
|
20 | -i, --ignore ignore pattern (glob expression)
|
21 | ```
|
22 |
|
23 | Multiple `--ignore` patterns may be given by using the `--ignore` option
|
24 | multiple times.
|
25 |
|
26 | This module also exports the `flowCopySource(sources, dest, options)` function.
|
27 | `sources` must be an array of strings, `dest` must be a string, and `options`
|
28 | may optionally be an object with optional `verbose` and `watch` boolean
|
29 | properties. The function returns a promise for an array of `{src, dest}`
|
30 | objects listing the operations done.
|