Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

assemble-fs

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

assemble-fs

Assemble plugin to add methods to assemble for working with the file system, like src, dest, copy and symlink.

  • 0.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
29K
decreased by-3.88%
Maintainers
1
Weekly downloads
 
Created
Source

assemble-fs NPM version

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

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 © 2015 Jon Schlinkert Released under the MIT license.


This file was generated by verb-cli on October 16, 2015.

Keywords

FAQs

Package last updated on 16 Oct 2015

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc