New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

watchbuild

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

watchbuild

watch files and transform them with streams

latest
Source
npmnpm
Version
0.2.1
Version published
Maintainers
1
Created
Source

watchbuild

Build Status

Watch files and transform them with streams.

var wb = require('watchbuild');
var marked = require('marked');
var through = require('through2');

// convert 'test.md' to html and write the result to 'test.html'
// whenever 'test.md' it changes
wb({ './test.md': './test.html' }, function () { return marked; });

// also supports streams
wb({ './foo.md': './foo.html' }, function () {
  return through(function (buf, _, next) {
    this.push(marked(buf.toString()));
    next();
  });
});

// and globs
wb({ './*bar.md': 'bar.html', './*foo.md': 'foo.html' }, function () { return marked; });

Installation

$ npm install watchbuild

API

watchbuild(files, transform)

files is an object mapping glob patterns to output paths. If a file is mapped to undefined or null, it isn't written anywhere.

transform can return a transform stream or a function that takes and returns a string.

License

MIT. See ./LICENSE for details.

TODO

  • more tests

FAQs

Package last updated on 30 May 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