Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Auto Sync ExportNew to Visual Studio Code? Get it now.
Auto Sync Export

Auto Sync Export

shaolinwang

|
245 installs
| (0) | Free
Automatically finds, parses and generate export code in 'index' file for the same dictionary. Works with Typescript and TSX.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

[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

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft