Skip to content

Automatically finds, parses and generate export code in 'index' file for the same dictionary. Works with Typescript and TSX.

License

Notifications You must be signed in to change notification settings

ShaolinWang/Auto-Sync-Export

Repository files navigation

[auto-sync-export]

NPM version

usage

when save document in a.{ts,js,jsx,tsx}, find export and copy to ./index.{ts,js,jsx,tsx}.

let's say we have file named a.ts

// a.ts
const foo = 1;
const bar = 2;
export default foo;
export { bar };

./index.{ts,js,jsx,tsx} will change synchronously.

export { default as foo } from './a';
export { bar } from './a';

supported list

  • .jsx .tsx .jx .ts extensions
  • named exports only

TODO LIST

  • test case for parser
  • more strict logic for adding export to index.{ts,js,jsx,tsx}
  • chore

License

MIT License © 2022 ShaolinWang

About

Automatically finds, parses and generate export code in 'index' file for the same dictionary. Works with Typescript and TSX.

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published