export-directory
v0.1.1
Published
automatically manage index.js files that export all files in the directory
Downloads
18
Readme
export-directory
This is a tool that manages index.js
files within your project that re-export all the other files in the same directory, like:
// export-directory
export * from './file1';
export * from './file2';
export * from './file3';
export * from './types';
It's efficient (runs in under a quarter of a second), configurable, supports watch mode, and also contains as a rollup/vite plugin.
npm i -D export-directory
The CLI can be ran efficiently.
export-directory [root="./"] [options]
Usage as a Rollup/Vite plugin
import exportDirectory from 'export-directory/rollup';
export default {
...
plugins: [
exportDirectory(),
],
};