UNPKG

2.75 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_license_url]: https://github.com/okunishinishi/node-filecopy/blob/master/LICENSE
21[bd_codeclimate_url]: http://codeclimate.com/github/okunishinishi/node-filecopy
22[bd_codeclimate_shield_url]: http://img.shields.io/codeclimate/github/okunishinishi/node-filecopy.svg?style=flat
23[bd_codeclimate_coverage_shield_url]: http://img.shields.io/codeclimate/coverage/github/okunishinishi/node-filecopy.svg?style=flat
24[bd_gemnasium_url]: https://gemnasium.com/okunishinishi/node-filecopy
25[bd_gemnasium_shield_url]: https://gemnasium.com/okunishinishi/node-filecopy.svg
26[bd_npm_url]: http://www.npmjs.org/package/filecopy
27[bd_npm_shield_url]: http://img.shields.io/npm/v/filecopy.svg?style=flat
28[bd_standard_url]: http://standardjs.com/
29[bd_standard_shield_url]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg
30
31<!-- Badge End -->
32
33
34<!-- Description Start -->
35<a name="description"></a>
36
37Copy files.
38
39<!-- Description End -->
40
41
42
43
44<!-- Sections Start -->
45<a name="sections"></a>
46
47<!-- Section from "doc/guides/01.Installation.md.hbs" Start -->
48
49<a name="section-doc-guides-01-installation-md"></a>
50Installation
51-----
52
53```bash
54npm install filecopy --save
55```
56
57<!-- Section from "doc/guides/01.Installation.md.hbs" End -->
58
59<!-- Section from "doc/guides/02.Usage.md.hbs" Start -->
60
61<a name="section-doc-guides-02-usage-md"></a>
62Usage
63----
64
65### Copy a Single File
66
67```javascript
68#!/usr/bin/env/node
69'use strict'
70
71const filecopy = require('filecopy')
72
73filecopy('src/some-text01.txt', 'dest/some-text01-copy.txt', {
74 mkdirp: true
75}).then(() => {
76 /* ... */
77});
78
79```
80
81### Copy Multiple Files
82
83```javascript
84#!/usr/bin/env node
85'use strict'
86
87const filecopy = require('filecopy')
88
89// Copy all files in src directory to dir.
90filecopy('src/*.txt', 'dest', {}).then(() => {
91 /* ... */
92})
93
94```
95
96
97<!-- Section from "doc/guides/02.Usage.md.hbs" End -->
98
99
100<!-- Sections Start -->
101
102
103<!-- LICENSE Start -->
104<a name="license"></a>
105
106License
107-------
108This software is released under the [MIT License](https://github.com/okunishinishi/node-filecopy/blob/master/LICENSE).
109
110<!-- LICENSE End -->
111
112