filemonger
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i filemonger

Weekly Downloads

0

Version

0.1.1

License

MIT

Unpacked Size

6.93 kB

Total Files

11

Last publish

Collaborators

  • robbiepitts