@jupyterlab/builder

  • Version 3.3.3
  • Published
  • 75.1 kB
  • 35 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 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 (3)

                            Dependencies (35)

                            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>