https://github.com/leegeunhyeok/esbuild-metafile-test
π Test and PoC of esbuild's metafile
https://github.com/leegeunhyeok/esbuild-metafile-test
Last synced: 24 days ago
JSON representation
π Test and PoC of esbuild's metafile
- Host: GitHub
- URL: https://github.com/leegeunhyeok/esbuild-metafile-test
- Owner: leegeunhyeok
- Created: 2023-12-23T07:52:38.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-23T10:58:49.000Z (over 1 year ago)
- Last Synced: 2025-02-14T11:53:50.342Z (3 months ago)
- Language: TypeScript
- Size: 71.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# esbuild-metafile-test
> Test + PoC of esbuild's metafile
- πΈοΈ Generate dependency graph from esbuild's metafile
- π Generate unique id for each modules
- βͺ Get reverse dependencies based on a specified module## Metafile
Using generated metafile from [react-native-esbuild](https://github.com/leegeunhyeok/react-native-esbuild)'s example project.
## Preview
### Dependencies
```js
// src/screens/MainScreen.tsx
const result = {
id: 1358,
dependencies: [
{ id: 510, path: 'node_modules/react/jsx-runtime.js' },
{ id: 74, path: 'node_modules/react/index.js' },
{ id: 449, path: 'node_modules/react-native/index.js' },
{
id: 519,
path: 'node_modules/react-native-safe-area-context/src/index.tsx'
},
{ id: 1043, path: 'node_modules/dripsy/src/index.ts' },
{ id: 1122, path: 'src/components/index.ts' },
{ id: 1357, path: 'src/assets/logo.svg' },
],
};
```### Inverse Dependencies
```js
// src/screens/MainScreen.tsx
const result = {
id: 1358,
inverseDependencies: [
{ id: 1358, path: 'src/screens/MainScreen.tsx' },
{ id: 1361, path: 'src/screens/index.ts' },
{ id: 1362, path: 'src/navigators/RootStack.tsx' },
{ id: 1363, path: 'src/navigators/index.ts' },
{ id: 1367, path: 'src/App.tsx' },
{ id: 0, path: 'index.js' },
],
};
```