Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

im-cli

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

im-cli

A command line tool to manage Import Maps

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

im-cli

im-cli is a command-line utility for managing JavaScript import maps. It simplifies the process of adding, updating, and deleting package entries in your import map JSON file.

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

Deleting a package

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

im delete 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"

FAQs

Package last updated on 01 Apr 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc