@fcostarodrigo/open-path

5.0.4 • Public • Published

OPEN-PATH

Codacy Badge Build Status codecov

Node module that creates missing folders in the middle of a path, like mkdir -p.

Setup

npm install @fcostarodrigo/open-path

Usage

CLI

npm install -g @fcostarodrigo/open-path
openPath --help
openPath <pathToOpen>

Positionals:
  pathToOpen  String with the path                                      [string]

Options:
  --help            Show help                                          [boolean]
  --version         Show version number                                [boolean]
  --fileInPath, -f  Indicates if the last item of the path is a file   [boolean]

Lib

const openPath = require("@fcostarodrigo/open-path");

async function main() {
  await openPath("docs/UI");
  fs.writeFileSync("docs/UI/button.txt", "test");
}

main();

Documentation

openPath(pathToOpen, fileInPath);

pathToOpen: String with the path.

fileInPath: Indicates if the last item of the path is a file.

Returns a promise.

License

MIT License

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 5.0.4
    1
    • latest

Version History

Package Sidebar

Install

npm i @fcostarodrigo/open-path

Weekly Downloads

1

Version

5.0.4

License

MIT

Unpacked Size

9.27 kB

Total Files

13

Last publish

Collaborators

  • fcostarodrigo