@cc-heart/gen-index-export
TypeScript icon, indicating that this package has built-in type declarations

2.2.0 • Public • Published

gen-index-export

In index.js, it is always necessary to import all the files under a module (eg export * from './foo').

Using this package you can parse all exported files in a certain path now support the suffix 'vue', 'ts', and' tsx '

Usage

npm install -D @cc-heart/gen-index-export

create the gen-export.config.js file in the root path of your project project, and write to the following configuration file:

import { defineConfig } from '@cc-heart/gen-index-export'
export default defineConfig({
  dirs: [{ path: 'src/components', output: 'src/components/index.ts' }],
})

Configure the scripts property in package.json

{
    "scripts": {
    "exports": "npx gen-index-export"
  },
}

Use npm run exports, You can generate the default export items or all export items based on the directory

Readme

Keywords

Package Sidebar

Install

npm i @cc-heart/gen-index-export

Weekly Downloads

0

Version

2.2.0

License

MIT

Unpacked Size

33.9 kB

Total Files

46

Last publish

Collaborators

  • cc-heart