0.0.6 • Published 2 years ago

@barelyhuman/fs-route-manifest v0.0.6

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years 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

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago