1.0.1 • Published 5 years ago

hiway v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

hiway

Detect and extract dependents of a file.

Install

$ yarn add hiway

Usage

hiway detects dependents of entryFile and copy them to the outputDir.

const hiway = require('hiway')

// outputDir is  __output__ by default
const depsPath = await hiway(entryPath, outputDir)

Or use cli:

$ hiway entryPath --out outputDir

It's useful(maybe) when you do these works:

  • Extract some part from a fat library. For example, extract THREE.Geometry from Three.js.
  • Refactor directory structure, you can get related files easily.