filemonger
Process files with streams
Last updated 2 years ago by robbiepitts .
MIT · Original npm · Tarball · package.json
$ cnpm install filemonger 
SYNC missed versions from official npm registry.

Filemonger

Using a filemonger

import typescriptmonger from "some-cool-package";

typescriptmonger("**/*.ts", "./src", "./dist").subscribe({
  next(file) {
    console.log("Built file:", file);
  },
  complete() {
    console.log("Donezo");
  },
  error(err) {
    console.error(err);
  }
});

Creating a filemonger

import makeFilemonger, { f, helpers: { copyFile } } from "filemonger";

export const passthroughmonger = makeFilemonger((file$, { srcDir, destDir }) =>
  file$.flatMap(file =>
      copyFile(
        f.fullPath(f.abs(join(srcDir, file))),
        f.fullPath(f.abs(join(destDir, file)))
      )
      .map(file => f.fullPath(f.rel(relative(destDir, file))))
  )
);

Current Tags

  • 0.1.1                                ...           latest (2 years ago)

2 Versions

  • 0.1.1                                ...           2 years ago
  • 0.1.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 0
Last Month 1
Dependencies (6)
Dev Dependencies (11)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |