0.6.7 • Published 5 years ago

file-genesis v0.6.7

Weekly downloads
4
License
MIT
Repository
-
Last release
5 years ago

logo

Build Status

Install


yarn add file-genesis

Use


const path = require("path");
const { File } = require("file-genesis");
const gitignore = `
  .DS_Store
  node_modules
`;

let filepathPlain = path.join(__dirname, ".gitignore");
File(filepathPlain).plain(gitignore);

Note: Prettier is used for formatting during creation


API


.plain(), .symlink(), .template()

This is used to specify the type and pass content

plain

File("/path/to/file.ext").plain("content");

symlink

File("/path/to/file.ext").symlink("/path/to/src", "/path/to/dest");

template

let variables = { replaceMe: "withThisValue" };
File("/path/to/file.ext").template("path/to/template.ext", variables);

Docs



Goals


  • consistent api for symlinks, plain UTF-8 files and templates
  • interoperable with content-genesis

Related


0.6.7

5 years ago

0.6.6

6 years ago

0.6.5

6 years ago

0.6.4

6 years ago

0.6.3

6 years ago

0.6.2

6 years ago

0.6.1

6 years ago

0.6.0

6 years ago

0.5.1

6 years ago