Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
assemble-fs
Advanced tools
Assemble plugin to add methods to assemble for working with the file system, like src, dest, copy and symlink.
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 with npm:
$ npm i assemble-fs --save
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/'))
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)
});
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
pluginsExample
app.src('src/*.hbs', {layout: 'default'});
Glob patterns or paths for symlinks.
Params
glob
{String|Array}Example
app.symlink('src/**');
Specify a destination for processed files.
Params
dest
{String|Function}: File path or rename function.options
{Object}: Options and locals to pass to dest
pluginsExample
app.dest('dist/');
Install dev dependencies:
$ npm i -d && npm test
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
v0.3.0
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.files
array to streamFiles
onStream
middleware handler to src
preWrite
middleware handler to dest
Jon Schlinkert
Copyright © 2016 Jon Schlinkert Released under the MIT license.
This file was generated by verb on January 19, 2016.
FAQs
Light wrapper for vinyl-fs to add streams support in a way that plays nice with Assemble middleware.
The npm package assemble-fs receives a total of 23,789 weekly downloads. As such, assemble-fs popularity was classified as popular.
We found that assemble-fs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.