Open zhuqingyv opened 1 year ago
// a.js export const a = {}
// b.js export const b = {}
// index.js export * from 'a'; export * from 'b';
// madge.js const madge = require('madge'); madge('index.js', { baseDir: './', fileExtensions: ['js', 'ts', 'tsx', 'jsx'], excludeRegExp: ['website', '.png', '.jpg'], // tsConfig: path.resolve(__dirname, './tsconfig.json') }).then((res) => { const list = res.leaves(); fs.writeFileSync(path.resolve(__dirname, './result.json'), JSON.stringify(list, null, 2)); });
output
[ "a.js", "b.js", ]
any answer?
output