import-ls

0.0.7 • Public • Published

import-ls

GitHub package.json version  Twitter profile badge of @saurabhcodes

Cover image of import-ls that displays the tree it has built. The image shows npx import-ls render.js --show-parent command. Documentation for the same is given below



WIP! Build import tree of local files in a JavaScript project

Usage

Command

npx import-ls <entry-file-path> [--module-type <require|import>] [--show-parent]

Example

npx import-ls index.js

Note: The tool will try to figure out what modules system is used from the code, but if it couldn't, you will have to use --module-type require or --module-type import flag to specify the import type.

Flags

Flags Description
--module-type <'require' or 'import'> Specify module type
--show-parent Adds parent name to log
--include-modules Includes modules in the log

Contributing

  • Fork this repository
git clone <url-of-your-fork>
cd import-ls
npm link # use sudo if needed 
cd example 
import-ls index.js --module-type require

Reach out to saurabhdaware99@gmail.com for any help


Being a patron or backing with a one-time payment through buy me a coffee will help me building more of such tools 🐨 🎉

Buy me a Coffee Button   Buy me a Coffee Button

For any help regarding the tool, you can follow me on Twitter @saurabhcodes

Readme

Keywords

none

Package Sidebar

Install

npm i import-ls

Weekly Downloads

2

Version

0.0.7

License

MIT

Unpacked Size

8.05 kB

Total Files

5

Last publish

Collaborators

  • saurabhdaware