Skip to content
This repository was archived by the owner on Aug 14, 2024. It is now read-only.
This repository was archived by the owner on Aug 14, 2024. It is now read-only.

Export/Create a new homedir API method #10

@fraxken

Description

@fraxken

Export (create) a new API method homedir. The goal is to design an API similar to Node.js os.homedir.

When we need to create and manage a "global" configuration on the system we need a dedicated directory for NodeSecure (to store the configuration).

This new method should return the path to a nodesecure directory is the os home directory:

import os from "os";
import path from "path";

// !! This !!
path.join(os.homedir(), "nodesecure")

The new API must be used like this:

import * as rc from "@nodesecure/rc";

rc.homedir();

This new API will be useful in our tools like CLI or CI (for example, look at kHomePath const: NodeSecure/cli#104).

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions