JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 349
  • Score
    100M100P100Q90913F
  • License MIT

A class to analyze and manipulate JavaScript import statements from source code files.

Package Exports

  • import-manager

Readme

Import Manager

License npm

This is the outsourced home of the underlying module for the rollup plugin: rollup-plugin-import-manager. To have the ability to analyze and modify JavaScript source code for import statements (cjs/es6/dynamic) without having to deal with rollup or rollup dependencies, the source code for the ImportManager class itself has its own repository. It can be downloaded and used independently from the rollup plugin and or a building process.

Note: A detailed documentation will follow soon.

Install

Using npm:

npm install import-manager

How it works

ImportManager analyzes a given source code for import statements. Those are collected as so called unit objects, on which the user can interact with. Also the creation of new units → import statements is possible.

Usage

Importing

import ImportManager from "import-manager

Initializing

const manager = new ImportManager(<sourceCodeAsString>, <filename>)

License

MIT

Copyright (c) 2022, UmamiAppearance