0.0.6 • Published 5 months ago

@barelyhuman/fs-route-manifest v0.0.6

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

fs-route-manifest

Simple manifest generation utilities for file system routing

Basic Usage

; npm i @barelyhuman/fs-route-manifest
import { generateRoutes, readDirectory, stringify } from "../src/index.ts";

// Read the routes directory and give all
// file paths
const filePaths = readDirectory("./routes");

// Generate a manifest or hashmap of information from the file path data from above
const urlManifest = generateRoutes("/routes", filePaths);

// stringify this data, so you can store it on the filesystem for caching and work avoidance
console.log(stringify(urlManifest));

API Reference

TypeAPI

0.0.6

5 months ago

0.0.5

5 months ago

0.0.4

5 months ago

0.0.3

5 months ago

0.0.2

5 months ago

0.0.1

5 months ago