@jupyterlab/builder

  • Version 4.2.4
  • Published
  • 109 kB
  • 31 dependencies
  • BSD-3-Clause license

Install

npm i @jupyterlab/builder
yarn add @jupyterlab/builder
pnpm add @jupyterlab/builder

Overview

JupyterLab - Extension Builder

Index

Namespaces

namespace Build

namespace Build {}
  • A namespace for JupyterLab build utilities.

function ensureAssets

ensureAssets: (options: IEnsureOptions) => webpack.Configuration[];
  • Ensures that the assets of plugin packages are populated for a build.

    @ Returns An array of lab extension config data.

function normalizeExtension

normalizeExtension: (module: IModule) => ILabExtension;
  • Returns JupyterLab extension metadata from a module.

interface IEnsureOptions

interface IEnsureOptions {}
  • The options used to ensure a root package has the appropriate assets for its JupyterLab extension packages.

property output

output: string;
  • The output directory where the build assets should reside.

property packageNames

packageNames: ReadonlyArray<string>;
  • The names of the packages to ensure.

property packagePaths

packagePaths?: ReadonlyArray<string>;
  • The package paths to ensure.

property schemaOutput

schemaOutput?: string;
  • The directory for the schema directory, defaults to the output directory.

property themeOutput

themeOutput?: string;
  • The directory for the theme directory, defaults to the output directory

interface ILabExtension

interface ILabExtension {}
  • The JupyterLab extension attributes in a module.

property extension

readonly extension?: boolean | string;
  • Indicates whether the extension is a standalone extension.

    #### Notes If true, the main export of the package is used. If set to a string path, the export from that path is loaded as a JupyterLab extension. It is possible for one package to have both an extension and a mimeExtension but they cannot be identical (i.e., the same export cannot be declared both an extension and a mimeExtension).

property mimeExtension

readonly mimeExtension?: boolean | string;
  • Indicates whether the extension is a MIME renderer extension.

    #### Notes If true, the main export of the package is used. If set to a string path, the export from that path is loaded as a JupyterLab extension. It is possible for one package to have both an extension and a mimeExtension but they cannot be identical (i.e., the same export cannot be declared both an extension and a mimeExtension).

property schemaDir

readonly schemaDir?: string;
  • The local schema file path in the extension package.

property themePath

readonly themePath?: string;
  • The local theme file path in the extension package.

interface IModule

interface IModule {}
  • A minimal definition of a module's package definition (i.e., package.json).

property jupyterlab

jupyterlab?: ILabExtension;
  • The JupyterLab metadata/

property main

main?: string;
  • The main entry point in a module.

property name

name: string;
  • The name of a module.

namespace duplicate-package-checker-webpack-plugin

module 'duplicate-package-checker-webpack-plugin' {}

    interface Options

    interface Options {}
    • The configurable options for the plugin

    property emitError

    emitError?: boolean;
    • Emit errors instead of warnings (default: false)

    property exclude

    exclude?: (instance: PackageInstanceProperties) => boolean;
    • Exclude instances of packages from the results. If all instances of a package are excluded, or all instances except one, then the package is no longer considered duplicated and won't be emitted as a warning/error.

      Parameter instance

      The instance of a package being evaluated for exclusion.

      Returns

      true to exclude the instance, false otherwise

    property showHelp

    showHelp?: boolean;
    • Show help message if duplicate packages are found (default: true)

    property strict

    strict?: boolean;
    • Warn also if major versions differ (default: true)

    property verbose

    verbose?: boolean;
    • Also show module that is requiring each duplicate package (default: false)

    interface PackageInstanceProperties

    interface PackageInstanceProperties {}
    • The properties of the instance of a package

    property issuer

    issuer?: string;
    • Absolute path to the module that requested the package

    property name

    name: string;
    • The name of the package

    property path

    path: string;
    • Absolute path to the package

    property version

    version: string;
    • The version of the package

    namespace mini-css-extract-plugin

    module 'mini-css-extract-plugin' {}

      namespace WPPlugin

      namespace WPPlugin {}

        variable DEFAULT_LICENSE_REPORT_FILENAME

        const DEFAULT_LICENSE_REPORT_FILENAME: string;
        • A well-known filename for third-party license information.

          ### Note If an alternate JupyterLab-based ecosystem wanted to implement a different name, they may _still_ need to handle the presence of this file if reusing any core files or extensions.

          If multiple files are found by jupyterlab_server, their packages` will be concatenated.

        class FilterWatchIgnorePlugin

        class FilterWatchIgnorePlugin {}
        • A WebPack Plugin that ignores files files that are filtered by a callback during a --watch build

        constructor

        constructor(ignored: (path: string) => boolean);

          property ignored

          ignored: (path: string) => boolean;

            method apply

            apply: (compiler: webpack.Compiler) => void;

              class FrontEndPlugin

              class FrontEndPlugin {}
              • A WebPack Plugin that copies the assets to the static directory

              constructor

              constructor(buildDir: string, staticDir: string);

                property buildDir

                buildDir: string;

                  property staticDir

                  staticDir: string;

                    method apply

                    apply: (compiler: webpack.Compiler) => void;

                      class JSONLicenseWebpackPlugin

                      class JSONLicenseWebpackPlugin extends LicenseWebpackPlugin {}
                      • a plugin that creates a predictable, machine-readable report of licenses for all modules included in this build

                      constructor

                      constructor(pluginOptions?: PluginOptions);

                        method renderLicensesJSON

                        renderLicensesJSON: (modules: LicenseIdentifiedModule[]) => string;
                        • render an SPDX-like record

                        class NowatchDuplicatePackageCheckerPlugin

                        class NowatchDuplicatePackageCheckerPlugin extends DuplicatePackageCheckerPlugin {}

                          property options

                          options: DuplicatePackageCheckerPlugin.Options;

                            method apply

                            apply: (compiler: webpack.Compiler) => void;

                              interface ILicenseReport

                              interface ILicenseReport {}
                              • A top-level report of the licenses for all code included in a bundle

                                ### Note

                                This is roughly informed by the terms defined in the SPDX spec, though is not an SPDX Document, since there seem to be several (incompatible) specs in that repo.

                                See Also

                                • https://github.com/spdx/spdx-spec/blob/development/v2.2.1/schemas/spdx-schema.json

                              property packages

                              packages: IPackageLicenseInfo[];

                                interface IPackageLicenseInfo

                                interface IPackageLicenseInfo {}
                                • A best-effort single bundled package's information.

                                  ### Note

                                  This is roughly informed by SPDX packages and hasExtractedLicenseInfos, as making it conformant would vastly complicate the structure.

                                  See Also

                                  • https://github.com/spdx/spdx-spec/blob/development/v2.2.1/schemas/spdx-schema.json

                                property extractedText

                                extractedText: string;
                                • the verbatim extracted text of the license, or an empty string if unknown

                                property licenseId

                                licenseId: string;
                                • an SPDX license or LicenseRef, or an empty string if unknown

                                property name

                                name: string;
                                • the name of the package as it appears in node_modules

                                property versionInfo

                                versionInfo: string;
                                • the version of the package, or an empty string if unknown

                                Package Files (5)

                                Dependencies (31)

                                Dev Dependencies (6)

                                Peer Dependencies (0)

                                No peer dependencies.

                                Badge

                                To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@jupyterlab/builder.

                                • Markdown
                                  [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@jupyterlab/builder)
                                • HTML
                                  <a href="https://www.jsdocs.io/package/@jupyterlab/builder"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>