0.0.2 • Published 5 years ago

puffs v0.0.2

Weekly downloads
5
License
ISC
Repository
github
Last release
5 years ago

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