# 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.

Latest version **0.3.5** (published 2016-05-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install base-fs
pnpm add base-fs
yarn add base-fs
bun add base-fs
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.5 |
| Published | 2016-05-28 |
| First published | 2015-10-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 8 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 14 |
| Author | Jon Schlinkert |
| Maintainers | jonschlinkert |
| Keywords | base, baseplugin, file, fs, system, vinyl |

## Links

- npm: https://www.npmjs.com/package/base-fs
- Repository: https://github.com/node-base/base-fs
- Issues: https://github.com/node-base/base-fs/issues
- npm.io page: https://npm.io/package/base-fs

## Dependencies (8)

- [dest](https://npm.io/package/dest.md) ^0.3.1
- [through2](https://npm.io/package/through2.md) ^2.0.1
- [vinyl-fs](https://npm.io/package/vinyl-fs.md) ^2.4.3
- [lazy-cache](https://npm.io/package/lazy-cache.md) ^2.0.1
- [is-registered](https://npm.io/package/is-registered.md) ^0.1.4
- [extend-shallow](https://npm.io/package/extend-shallow.md) ^2.0.1
- [stream-exhaust](https://npm.io/package/stream-exhaust.md) ^1.0.1
- [is-valid-instance](https://npm.io/package/is-valid-instance.md) ^0.1.0

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 0.3.5 (latest) — 2016-05-28
- 0.3.4 — 2016-05-24
- 0.3.3 — 2016-05-15
- 0.3.1 — 2016-03-17
- 0.3.0 — 2016-01-31
- 0.2.1 — 2016-01-19
- 0.2.0 — 2015-10-29
- 0.1.2 — 2015-10-28
- 0.1.1 — 2015-10-28
- 0.1.0 — 2015-10-28

## README

# base-fs [![NPM version](https://img.shields.io/npm/v/base-fs.svg?style=flat)](https://www.npmjs.com/package/base-fs) [![NPM downloads](https://img.shields.io/npm/dm/base-fs.svg?style=flat)](https://npmjs.org/package/base-fs) [![Build Status](https://img.shields.io/travis/node-base/base-fs.svg?style=flat)](https://travis-ci.org/node-base/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.

You might also be interested in [base-fs-conflicts](https://github.com/node-base/base-fs-conflicts).

## Install

Install with [npm](https://www.npmjs.com/):

```sh
$ npm install base-fs --save
```

## Usage

```js
var fs = require('base-fs');
var base = require('base-methods');
var app = base();

// create your application and add the plugin
app.use(fs());

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

## API

### [.src](index.js#L33)

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**

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

### [.symlink](index.js#L49)

Glob patterns or paths for symlinks.

**Params**

* `glob` **{String|Array}**

**Example**

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

### [.dest](index.js#L65)

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**

```js
app.dest('dist/');
```

### [.copy](index.js#L90)

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**

```js
app.task('assets', function(cb) {
  app.copy('assets/**', 'dist/')
    .on('error', cb)
    .on('finish', cb)
});
```

## Related projects

You might also be interested in these projects:

* [base-data](https://www.npmjs.com/package/base-data): adds a `data` method to base-methods. | [homepage](https://github.com/node-base/base-data)
* [base-option](https://www.npmjs.com/package/base-option): Adds a few options methods to base, like `option`, `enable` and `disable`. See the readme… [more](https://www.npmjs.com/package/base-option) | [homepage](https://github.com/node-base/base-option)
* [base-plugins](https://www.npmjs.com/package/base-plugins): Upgrade's plugin support in base applications to allow plugins to be called any time after… [more](https://www.npmjs.com/package/base-plugins) | [homepage](https://github.com/node-base/base-plugins)
* [base-store](https://www.npmjs.com/package/base-store): Plugin for getting and persisting config values with your base-methods application. Adds a 'store' object… [more](https://www.npmjs.com/package/base-store) | [homepage](https://github.com/node-base/base-store)

## Contributing

This document was generated by [verb](https://github.com/verbose/verb), please don't edit directly. Any changes to the readme must be made in [.verb.md](.verb.md). See [Building Docs](#building-docs).

Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/node-base/base-fs/issues/new).

## Building docs

Generate readme and API documentation with [verb](https://github.com/verbose/verb):

```sh
$ npm install -g verb verb-readme-generator && verb
```

## Running tests

Install dev dependencies:

```sh
$ npm install -d && npm test
```

## Author

**Jon Schlinkert**

* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)

## License

Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT license](https://github.com/node-base/base-fs/blob/master/LICENSE).

***

_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on May 28, 2016._

---
_Source: https://npm.io/package/base-fs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
