fileconcat

2019-07-14 admin

fileconcat是什么

什么是fileconcat,Concat multiple files into one.

fileconcat使用教程帮助文档

fileconcat

<a name=“user-content-badges”></a>

Build Status Code Climate Code Coverage npm Version JS Standard

<a name=“user-content-description”></a>

Concat multiple files into one.

<a name=“user-content-sections”></a>

<a name=“user-content-section-doc-guides-01-installation-md”></a>Installation

npm install fileconcat --save

<a name=“user-content-section-doc-guides-02-usage-md”></a>Usage

fileconcat(src, dest, callback)

'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)

'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(() => {
  /* ... */
})

<a name=“user-content-section-doc-guides-03-options-md”></a>Options

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.

<a name=“user-content-license”></a>

License

This software is released under the MIT License.

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-69694.html

文章标题:fileconcat

回到顶部