1 | import * as webpack from 'webpack';
|
2 | /**
|
3 | * A namespace for JupyterLab build utilities.
|
4 | */
|
5 | export declare namespace Build {
|
6 | /**
|
7 | * The options used to ensure a root package has the appropriate
|
8 | * assets for its JupyterLab extension packages.
|
9 | */
|
10 | interface IEnsureOptions {
|
11 | /**
|
12 | * The output directory where the build assets should reside.
|
13 | */
|
14 | output: string;
|
15 | /**
|
16 | * The names of the packages to ensure.
|
17 | */
|
18 | packageNames: ReadonlyArray<string>;
|
19 | }
|
20 | /**
|
21 | * The JupyterLab extension attributes in a module.
|
22 | */
|
23 | interface ILabExtension {
|
24 | /**
|
25 | * Indicates whether the extension is a standalone extension.
|
26 | *
|
27 | * #### Notes
|
28 | * If `true`, the `main` export of the package is used. If set to a string
|
29 | * path, the export from that path is loaded as a JupyterLab extension. It
|
30 | * is possible for one package to have both an `extension` and a
|
31 | * `mimeExtension` but they cannot be identical (i.e., the same export
|
32 | * cannot be declared both an `extension` and a `mimeExtension`).
|
33 | */
|
34 | readonly extension?: boolean | string;
|
35 | /**
|
36 | * Indicates whether the extension is a MIME renderer extension.
|
37 | *
|
38 | * #### Notes
|
39 | * If `true`, the `main` export of the package is used. If set to a string
|
40 | * path, the export from that path is loaded as a JupyterLab extension. It
|
41 | * is possible for one package to have both an `extension` and a
|
42 | * `mimeExtension` but they cannot be identical (i.e., the same export
|
43 | * cannot be declared both an `extension` and a `mimeExtension`).
|
44 | */
|
45 | readonly mimeExtension?: boolean | string;
|
46 | /**
|
47 | * The local schema file path in the extension package.
|
48 | */
|
49 | readonly schemaDir?: string;
|
50 | /**
|
51 | * The local theme file path in the extension package.
|
52 | */
|
53 | readonly themePath?: string;
|
54 | }
|
55 | /**
|
56 | * A minimal definition of a module's package definition (i.e., package.json).
|
57 | */
|
58 | interface IModule {
|
59 | /**
|
60 | * The JupyterLab metadata/
|
61 | */
|
62 | jupyterlab?: ILabExtension;
|
63 | /**
|
64 | * The main entry point in a module.
|
65 | */
|
66 | main?: string;
|
67 | /**
|
68 | * The name of a module.
|
69 | */
|
70 | name: string;
|
71 | }
|
72 | /**
|
73 | * Ensures that the assets of plugin packages are populated for a build.
|
74 | *
|
75 | * @ Returns An array of lab extension config data.
|
76 | */
|
77 | function ensureAssets(options: IEnsureOptions): webpack.Configuration[];
|
78 | /**
|
79 | * Returns JupyterLab extension metadata from a module.
|
80 | */
|
81 | function normalizeExtension(module: IModule): ILabExtension;
|
82 | }
|