CLI tool to generate barrel files for TypeScript projects.
npm install --save-dev @amirsavand/ts-barrel
You can execute it in the terminal or import the module.
ts-barrel init
ts-barrel
import { generateBarrelFiles } from '@amirsavand/ts-barrel';
// Start generating barrel files.
// Start from the "src/" directory.
// Ignore "foo/" and "bar/" directories.
generateBarrelFiles({
// List of folders to process.
root: ['src'],
// List of folders to ignore from process (their
// children are not ignored).
ignore: ['foo', 'bar'],
});
Made with 💖 by Savand Bros © 2023-present.