puffs
v0.0.2
Published
puff
Downloads
2
Readme
puff
A package for ananysis file dependencies. Using precinct to do the file parsing jobs.
support:
- .js, .ts (as precinct does)
- .less, .sass
- .vue
usage
npm i puffs
import { resolve } form 'path';
import { parse } from 'puffs';
const result = await parse(path.resolve('/path/to/file.vue'));
api
prase
parse the file path and its file dependencies.
returns:
- maxDepth, max dependencies depth
- flattenDependencyFilePaths, all file paths including the entry file itself
- entry, dependencies tree from the entry
- externals, externals node_module dependencies