fly-import
Install and import packages on-the-fly
Last updated 2 months ago by GitHub Actions .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install fly-import 
SYNC missed versions from official npm registry.

fly-import

Install and import packages on-the-fly

Usage

Supports many different specifications.

import { flyImport } from 'fly-import';

const { flyImport: flyImport2 } = await flyImport('fly-import@0.1.2');

const { flyInstall } = await 'fly-import2@npm:fly-import@0.1.2';

console.log(await flyInstall('camelcase-git@github:sindresorhus/camelcase#v7.0.1'));

Import a subpath of a package, resolved through its exports when it declares them:

import { flyImport } from 'fly-import';

const { customAlphabet } = await flyImport('nanoid@5', { subpath: 'non-secure' });

Abort an install with a signal, which cancels its registry requests:

import { flyImport } from 'fly-import';

const { default: camelcase } = await flyImport('camelcase@8', { signal: AbortSignal.timeout(60_000) });

Bins of installed packages are not linked, pass arboristConfig: { binLinks: true } to link them at <repositoryPath>/../bin (<repositoryPath> on Windows).

License

MIT

Current Tags

  • 2.1.1                                ...           latest (2 months ago)

17 Versions

  • 2.1.1                                ...           2 months ago
  • 2.1.0                                ...           2 months ago
  • 2.0.0                                ...           2 months ago
  • 1.2.0                                ...           2 months ago
  • 1.1.1                                ...           2 months ago
  • 1.0.0                                ...           a year ago
  • 0.4.1                                ...           2 years ago
  • 0.4.0                                ...           3 years ago
  • 0.3.1                                ...           3 years ago
  • 0.3.0                                ...           3 years ago
  • 0.2.0                                ...           4 years ago
  • 0.1.5                                ...           4 years ago
  • 0.1.4                                ...           4 years ago
  • 0.1.3                                ...           4 years ago
  • 0.1.2                                ...           4 years ago
  • 0.1.1                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
Maintainers (1)
Downloads
Total 59
Today 0
This Week 0
This Month 38
Last Day 0
Last Week 0
Last Month 5
Dependencies (6)
Dev Dependencies (13)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE