Latest Threat ResearchGlassWorm Loader Hits Open VSX via Developer Account Compromise.Details
Socket
Book a DemoInstallSign in
Socket

base-fs

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

base-fs

base-methods plugin that adds vinyl-fs methods to your 'base' application for working with the file system, like src, dest, copy and symlink.

Source
npmnpm
Version
0.3.0
Version published
Maintainers
1
Created
Source

base-fs NPM version Build Status

base-methods plugin that adds vinyl-fs methods to your 'base' application for working with the file system, like src, dest, copy and symlink.

Install

Install with npm:

$ npm i base-fs --save

Usage

var base = require('base-methods');
var fs = require('base-fs');

// create your application and add the plugin
var app = base()
  .use(fs())

// now you can use `app.src` and `app.dest`
app.src(['foo/*.hbs'])
  .pipe(app.dest('site/'))

API

.src

Glob patterns or filepaths to source files.

Params

  • glob {String|Array}: Glob patterns or file paths to source files.
  • options {Object}: Options or locals to merge into the context and/or pass to src plugins

Example

app.src('src/*.hbs', {layout: 'default'});

Glob patterns or paths for symlinks.

Params

  • glob {String|Array}

Example

app.symlink('src/**');

.dest

Specify a destination for processed files.

Params

  • dest {String|Function}: File path or rename function.
  • options {Object}: Options and locals to pass to dest plugins

Example

app.dest('dist/');

.copy

Copy files with the given glob patterns to the specified dest.

Params

  • patterns {String|Array}: Glob patterns of files to copy.
  • dest {String|Function}: Desination directory.
  • returns {Stream}: Stream, to continue processing if necessary.

Example

app.task('assets', function(cb) {
  app.copy('assets/**', 'dist/')
    .on('error', cb)
    .on('finish', cb)
});
  • base-cli: Plugin for base-methods that maps built-in methods to CLI args (also supports methods from a… more | homepage
  • base-config: base-methods plugin that adds a config method for mapping declarative configuration values to other 'base'… more | homepage
  • base-data: adds a data method to base-methods. | homepage
  • base-methods: base-methods is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting… more | homepage
  • base-options: Adds a few options methods to base-methods, like option, enable and disable. See the readme… more | homepage
  • base-plugins: Upgrade's plugin support in base-methods to allow plugins to be called any time after init. | homepage
  • base-store: Plugin for getting and persisting config values with your base-methods application. Adds a 'store' object… more | homepage

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

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

Author

Jon Schlinkert

License

Copyright © 2016 Jon Schlinkert Released under the MIT license.

This file was generated by verb on January 19, 2016.

Keywords

base

FAQs

Package last updated on 31 Jan 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