Socket
Book a DemoInstallSign in
Socket

base-files-process

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

base-files-process

Plugin for processing files from a declarative configuration.

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

base-files-process NPM version NPM downloads Build Status

Plugin for processing files from a declarative configuration.

Table of Contents

(TOC generated by verb using markdown-toc)

Install

Install with npm:

$ npm install --save base-files-process

Usage

var files = require('base-files-process');

Example

var Base = require('base-app');
var expand = require('expand-files');
var pipeline = require('base-pipeline');
var files = require('base-files-process');
var app = new Base();

app.use(pipeline());
app.use(files());

// register pipeline plugins using the `.plugin` method
app.plugin('foo', function(options) {
  return through.obj(function(file, enc, next) {
    // do plugin stuff
    next(null, file);
  });
});

// use `expand-files` to expand a declarative configuration object
var config = expand({
  cwd: fixtures,
  src: '*.txt',
  dest: actual
});

// pass the config object to `.processFiles()`
app.processFiles(config)
  .on('end', function() {
    console.log('done!');
  });

API

.processFiles

Process an array of files objects, where each object has a src and dest property.

Params

  • files {Array}
  • options {Object}
  • returns {Stream}

Example

var expand = require('expand-files');
var config = expand({
  cwd: fixtures,
  src: 'b.txt',
  dest: actual
});

app.processFiles(config)
  .on('error', console.log)
  .on('end', console.log);

History

v0.2.0 - 2016-07-18

Breaking changes

  • renamed the .process method to .processFiles

About

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Building docs

(This document was generated by verb-generate-readme (a verb generator), please don't edit the readme directly. Any changes to the readme must be made in .verb.md.)

To generate the readme and API documentation with verb:

$ npm install -g verb verb-generate-readme && verb

Running tests

Install dev dependencies:

$ npm install -d && npm test

Author

Jon Schlinkert

License

Copyright © 2016, Jon Schlinkert. Released under the MIT license.

This file was generated by verb, v0.9.0, on July 18, 2016.

Keywords

api

FAQs

Package last updated on 18 Jul 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts