1 | import webpack from 'webpack';
|
2 | import './utils/ensureWebpack';
|
3 | import * as Rsg from '../typings';
|
4 | /**
|
5 | * Initialize Styleguide API.
|
6 | *
|
7 | * @param {object} [config] Styleguidist config.
|
8 | * @returns {object} API.
|
9 | */
|
10 | export default function (configArg?: Rsg.StyleguidistConfig | string): {
|
11 | /**
|
12 | * Build style guide.
|
13 | *
|
14 | * @param {Function} callback callback(err, config, stats).
|
15 | * @return {Compiler} Webpack Compiler instance.
|
16 | */
|
17 | build(callback: (err: Error, styleguidistConfig: Rsg.SanitizedStyleguidistConfig, stats: webpack.Stats) => void): webpack.Compiler;
|
18 | /**
|
19 | * Start style guide dev server.
|
20 | *
|
21 | * @param {Function} callback callback(err, config).
|
22 | * @return {ServerInfo.App} Webpack-Dev-Server.
|
23 | * @return {ServerInfo.Compiler} Webpack Compiler instance.
|
24 | */
|
25 | server(callback: (err: Error | undefined, styleguidistConfig: Rsg.SanitizedStyleguidistConfig) => void): {
|
26 | app: import("webpack-dev-server");
|
27 | compiler: webpack.Compiler; /**
|
28 | * Initialize Styleguide API.
|
29 | *
|
30 | * @param {object} [config] Styleguidist config.
|
31 | * @returns {object} API.
|
32 | */
|
33 | };
|
34 | /**
|
35 | * Return Styleguidist Webpack config.
|
36 | *
|
37 | * @param {string} [env=production] 'production' or 'development'.
|
38 | * @return {object}
|
39 | */
|
40 | makeWebpackConfig(env?: 'development' | 'production' | 'none'): webpack.Configuration;
|
41 | };
|