barrelsmith
v0.0.7
Published
A barrel file generator
Downloads
9
Readme
barrelsmith
Installation
npm install -D barrelsmithUsage
npm barrelsmithFor watch mode:
npm barrelsmith -wConfiguration
barrelsmith works with barrel forges, which are files named barrel.forge.ts
These files are used to configure multiple barrels in a single project.
You can place the barrel entries wherever you want, they will be found by barrelsmith.
// barrel.forge.ts
import { BarrelForge } from "barrelsmith";
export default BarrelForge({
// The root directories to search for files
roots: ["./playground/src"],
// The output barrel file
output: "./playground/dist.ts",
// Additional code to append to the bottom of the output file
append: ["./playground/additional_code.js"],
// Select which declarations to export
exports: ["interface", "enum"],
});⚠️ By now all paths are relative to the project root.
