Package Exports
- assemble-fs
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (assemble-fs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
assemble-fs

Assemble plugin to add methods to assemble for working with the file system, like src, dest, copy and symlink.
This is an assemble core plugin, you probably won't need to use this directly.
Install
Install with npm:
$ npm i assemble-fs --save
Usage
var assemble = require('assemble');
// create your application and add the plugin
var app = assemble()
.use(require('assemble-fs'))
// now you can use `src` and `dest`
app.src(['foo/*.hbs'])
.pipe(app.dest('site/'))
API
.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)
});
.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 tosrc
plugins
Example
app.src('src/*.hbs', {layout: 'default'});
.symlink
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 todest
plugins
Example
app.dest('dist/');
Related projects
- assemble: Assemble is a powerful, extendable and easy to use static site generator for node.js. Used… more | homepage
- assemble-loader: Assemble plugin (^0.6.0) for loading globs of views onto custom view collections. Also works with… more | homepage
- assemble-render-file: Assemble plugin for rendering views in a vinyl pipeline. | homepage
- assemble-streams: Assemble pipeline plugin for pushing a view collection into a vinyl stream. | 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.
History
v0.3.0
- breaking change! plugin is wrapped in a function that now be called when registered. e.g.
fs()
. This is to be consistent with assemble's plugin guidelines, and allows the plugin to be auto-loaded following the same format as other plugins. - rename
files
array tostreamFiles
- adds
onStream
middleware handler tosrc
- adds
preWrite
middleware handler todest
Author
Jon Schlinkert
License
Copyright © 2016 Jon Schlinkert Released under the MIT license.
This file was generated by verb on January 19, 2016.