library-index-files
v1.0.2
Published
Automatic creation of index.ts file with export-values from all files and folders recursively.
Downloads
2
Readme
generate-index-file
Automatic creation of index.ts file with export-values from all files and folders recursively.
It will generate something like this for folders:
--src/
-----a/
-------a1.vue
-------a2.vue
-----b/
-------b1.vue
-------b2.vue
-----c/
Index.ts:
export { default as a } from './a';
export { default as b } from './b';
export * as a from './a'
export * as b from './b'
//export * as c from './c' // it will create the export only if there are files in it
a/Index.ts
export { default as a1 } from './a1.vue';
export { default as a2 } from './a2.vue';
b/Index.ts
export { default as b1 } from './b1.vue';
export { default as b2 } from './b2.vue';
Install
npm:
npm install library-index-files
Usage
npm
npx generate-index-file ./src
Options
--help
--version Show the version package
Special thanks
This library comes from cloning generate-index-file.