UNPKG

2.91 kBMarkdownView Raw
1filecopy
2==========
3
4<!---
5This file is generated by ape-tmpl. Do not update manually.
6--->
7
8<!-- Badge Start -->
9<a name="badges"></a>
10
11[![Build Status][bd_travis_shield_url]][bd_travis_url]
12[![Code Climate][bd_codeclimate_shield_url]][bd_codeclimate_url]
13[![Code Coverage][bd_codeclimate_coverage_shield_url]][bd_codeclimate_url]
14[![npm Version][bd_npm_shield_url]][bd_npm_url]
15[![JS Standard][bd_standard_shield_url]][bd_standard_url]
16
17[bd_repo_url]: https://github.com/okunishinishi/node-filecopy
18[bd_travis_url]: http://travis-ci.org/okunishinishi/node-filecopy
19[bd_travis_shield_url]: http://img.shields.io/travis/okunishinishi/node-filecopy.svg?style=flat
20[bd_travis_com_url]: http://travis-ci.com/okunishinishi/node-filecopy
21[bd_travis_com_shield_url]: https://api.travis-ci.com/okunishinishi/node-filecopy.svg?token=
22[bd_license_url]: https://github.com/okunishinishi/node-filecopy/blob/master/LICENSE
23[bd_codeclimate_url]: http://codeclimate.com/github/okunishinishi/node-filecopy
24[bd_codeclimate_shield_url]: http://img.shields.io/codeclimate/github/okunishinishi/node-filecopy.svg?style=flat
25[bd_codeclimate_coverage_shield_url]: http://img.shields.io/codeclimate/coverage/github/okunishinishi/node-filecopy.svg?style=flat
26[bd_gemnasium_url]: https://gemnasium.com/okunishinishi/node-filecopy
27[bd_gemnasium_shield_url]: https://gemnasium.com/okunishinishi/node-filecopy.svg
28[bd_npm_url]: http://www.npmjs.org/package/filecopy
29[bd_npm_shield_url]: http://img.shields.io/npm/v/filecopy.svg?style=flat
30[bd_standard_url]: http://standardjs.com/
31[bd_standard_shield_url]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg
32
33<!-- Badge End -->
34
35
36<!-- Description Start -->
37<a name="description"></a>
38
39Copy files.
40
41<!-- Description End -->
42
43
44
45
46<!-- Sections Start -->
47<a name="sections"></a>
48
49<!-- Section from "doc/guides/01.Installation.md.hbs" Start -->
50
51<a name="section-doc-guides-01-installation-md"></a>
52
53Installation
54-----
55
56```bash
57npm install filecopy --save
58```
59
60<!-- Section from "doc/guides/01.Installation.md.hbs" End -->
61
62<!-- Section from "doc/guides/02.Usage.md.hbs" Start -->
63
64<a name="section-doc-guides-02-usage-md"></a>
65
66Usage
67----
68
69### Copy a Single File
70
71```javascript
72#!/usr/bin/env/node
73'use strict'
74
75const filecopy = require('filecopy')
76
77filecopy('src/some-text01.txt', 'dest/some-text01-copy.txt', {
78 mkdirp: true
79}).then(() => {
80 /* ... */
81});
82
83```
84
85### Copy Multiple Files
86
87```javascript
88#!/usr/bin/env node
89'use strict'
90
91const filecopy = require('filecopy')
92
93// Copy all files in src directory to dir.
94filecopy('src/*.txt', 'dest', {}).then(() => {
95 /* ... */
96})
97
98```
99
100
101<!-- Section from "doc/guides/02.Usage.md.hbs" End -->
102
103
104<!-- Sections Start -->
105
106
107<!-- LICENSE Start -->
108<a name="license"></a>
109
110License
111-------
112This software is released under the [MIT License](https://github.com/okunishinishi/node-filecopy/blob/master/LICENSE).
113
114<!-- LICENSE End -->
115
116