@projectsophon/workspace
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

@projectsophon/workspace

Utility for finding workspace directory paths in a project using npm workspaces.

Usage

const workspace = require("@projectsophon/workspace");

console.log(workspace("client")); // prints absolute path to your workspace named "client"

API

workspace(name)

Takes a workspace name and returns an absolute string path to the workspace location if it exists. This requires your package-lock.json file to be up-to-date, which allows this package to behave synchronously.

Package Sidebar

Install

npm i @projectsophon/workspace

Weekly Downloads

1

Version

2.0.0

License

GPL-3.0

Unpacked Size

39 kB

Total Files

6

Last publish

Collaborators

  • phated
  • sophonbot