@feature-sliced/filesystem
A set of utilities for locating and working with FSD roots in the file system.
This project is intended for developers of tooling for Feature-Sliced Design.
Installation
pnpm add @feature-sliced/filesystem
npm install --save @feature-sliced/filesystem
Type definitions are built in 😎.
Usage
import { locateInFsdRoot } from "@feature-sliced/filesystem";
console.log(
locateInFsdRoot("/home/ubuntu/frontend/src/pages/home/ui/HomePage.tsx"),
);
// {
// fsdRoot: "/home/ubuntu/frontend/src",
// layer: "pages",
// slice: "home",
// segment: "ui",
// }