@rmtc/project v1.1.0
@rmtc/project
A class to represent the project that the @rmtc/toolchain CLI is running in.
!WARNING This package is intended for internal use by @rmtc/toolchain. It's probably not useful by itself.
!WARNING This project is intended for use in @rowanmanning's projects. It's free to use but I don't offer support for use-cases outside of what I need.
Table of Contents
Requirements
This library requires the following to run:
- Node.js 18+
Usage
Install the module with npm:
npm install @rmtc/projectCreate a project with:
const {Project} = require('@rmtc/project');
const project = await Project.fromDirectory(`/path/to/project/directory`);project.directoryPath
string. The directory path that the project is in.
project.name
string. The name of the project, extracted from either the package.json name property or the last part of the project directory path.
project.isPrivate
boolean | null. Whether the project is marked as private in package.json. A value of null indicates that the package was not processable.
project.isMonorepo
boolean | null. Whether the project is a monorepo, defining npm workspaces. A value of null indicates that the package was not processable.
Contributing
See the central README for a contribution guide and code of conduct.
License
Licensed under the MIT license. Copyright © 2024, Rowan Manning