5.0.4 • Published 4 years ago

@fcostarodrigo/open-path v5.0.4

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

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

5.0.4

4 years ago

5.0.3

4 years ago

5.0.2

4 years ago

5.0.1

5 years ago

5.0.0

5 years ago

4.0.1

5 years ago

4.0.0

5 years ago