Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/okunishinishi/node-fileconcat
Node.js module to concat multiple files into one.
https://github.com/okunishinishi/node-fileconcat
Last synced: 2 months ago
JSON representation
Node.js module to concat multiple files into one.
- Host: GitHub
- URL: https://github.com/okunishinishi/node-fileconcat
- Owner: okunishinishi
- License: mit
- Created: 2015-08-01T00:09:26.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-05-06T10:36:21.000Z (over 8 years ago)
- Last Synced: 2024-11-14T05:45:33.558Z (2 months ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/fileconcat
- Size: 28.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
fileconcat
==========[![Build Status][bd_travis_shield_url]][bd_travis_url]
[![Code Climate][bd_codeclimate_shield_url]][bd_codeclimate_url]
[![Code Coverage][bd_codeclimate_coverage_shield_url]][bd_codeclimate_url]
[![npm Version][bd_npm_shield_url]][bd_npm_url]
[![JS Standard][bd_standard_shield_url]][bd_standard_url][bd_repo_url]: https://github.com/okunishinishi/node-fileconcat
[bd_travis_url]: http://travis-ci.org/okunishinishi/node-fileconcat
[bd_travis_shield_url]: http://img.shields.io/travis/okunishinishi/node-fileconcat.svg?style=flat
[bd_license_url]: https://github.com/okunishinishi/node-fileconcat/blob/master/LICENSE
[bd_codeclimate_url]: http://codeclimate.com/github/okunishinishi/node-fileconcat
[bd_codeclimate_shield_url]: http://img.shields.io/codeclimate/github/okunishinishi/node-fileconcat.svg?style=flat
[bd_codeclimate_coverage_shield_url]: http://img.shields.io/codeclimate/coverage/github/okunishinishi/node-fileconcat.svg?style=flat
[bd_gemnasium_url]: https://gemnasium.com/okunishinishi/node-fileconcat
[bd_gemnasium_shield_url]: https://gemnasium.com/okunishinishi/node-fileconcat.svg
[bd_npm_url]: http://www.npmjs.org/package/fileconcat
[bd_npm_shield_url]: http://img.shields.io/npm/v/fileconcat.svg?style=flat
[bd_standard_url]: http://standardjs.com/
[bd_standard_shield_url]: https://img.shields.io/badge/code%20style-standard-brightgreen.svgConcat multiple files into one.
```bash
npm install fileconcat --save
```**fileconcat(src, dest, callback)**
```javascript
'use strict'const fileconcat = require('fileconcat')
let src = [
'src/javascripts/lib/*.js',
'src/javascripts/*.js'
]
let dest = 'dist/javascripts/all.js'// Concat files into one.
fileconcat(src, dest).then(() => {
/* ... */
})```
**fileconcat(src, dest, options, callback)**
```javascript
'use strict'// Concat files into one with options.
fileconcat(src, dest, {
unique: true,
mkdirp: true,
mode: '444',
beforeEach (context) {
return '\n//======= ' + context.src + ' ==========\n'
}
}).then(() => {
/* ... */
})```
| Key | Type | Description |
| --- | ---- | ----------- |
| unique | Boolean | Reject duplicate files. Use full when you pass multiple glob patterns. |
| mkdirp | Boolean | Make parent directories if needed. |
| mode | String | File permission |
| beforeEach | String#124;Function | String to append before each content. |
| afterEach | String#124;Function to append after each content. |License
-------
This software is released under the [MIT License](https://github.com/okunishinishi/node-fileconcat/blob/master/LICENSE).