jspm

Function getPackageConfig

  • Get the package.json configuration for a specific URL or package.

    Returns

    Package JSON configuration

    Example:

    import { getPackageConfig } from '@jspm/generator';

    // Supports a resolved package
    {
    const packageJson = await getPackageConfig({ registry: 'npm', name: 'lit-element', version: '2.5.1' });
    }

    // Or alternatively provide any URL
    {
    const packageJson = await getPackageConfig('https://ga.jspm.io/npm:lit-element@2.5.1/lit-element.js');
    }

    Parameters

    • pkg: string | URL | ExactPackage

      Package to lookup configuration for

    • lookupOptions: LookupOptions = {}

      Optional provider and cache defaults for lookup

    Returns Promise<PackageConfig | null>

Generated using TypeDoc