1.0.2 • Published 1 year ago

im-cli v1.0.2

Weekly downloads
14
License
MIT
Repository
github
Last release
1 year ago

Import Maps Command Line Interface

A command-line utility for managing JavaScript import maps dependencies.

This utility uses the esm.sh CDN to fetch package information and versions.

Installation

To install im-cli globally, run the following command:

npm install -g im-cli

Usage

im <command> [package-name] [@version]

Commands

Adding a package

To add a package called lodash to your import map JSON file, run:

im add lodash

To add a specific version of the lodash package, include the version with the package name:

im add lodash@4.17.21

Updating a package

To update the lodash package to the latest version, run:

im update lodash

Removing a package

To remove the lodash package from your import map JSON file, run:

im remove lodash

Displaying help

To display a help message with command usage, run:

im help

Import map usage in HTML

To use the generated import map in your HTML file, include the following script tag:

<script type="importmap" src="path/to/your/im.json"></script>

Now you can use the ES module imports in your JavaScript files:

import _ from "lodash"
1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago