UNPKG

2.66 kBTypeScriptView Raw
1import { CopyTuple, IMap, ICopy, ICpu } from './interfaces';
2import { Options, BrowserSyncInstance } from 'browser-sync';
3export declare const cwd: string;
4/**
5 * Seed
6 * Internal method for seeding examples/templates.
7 *
8 * @param type the type of seed to run.
9 * @param dest the optional destination relative to root.
10 */
11export declare function seed(type: string, dest?: string): void;
12/**
13 * Clean
14 * Removes file(s) using provided glob(s).
15 *
16 * @param globs glob or array of glob strings.
17 */
18export declare function clean(globs: string | string[]): void;
19/**
20 * Copy
21 * Copies source to target. Does NOT support globs.
22 *
23 * @param src the source path to be copied.
24 * @param dest the destination path to copy to.
25 */
26export declare function copy(src: string, dest: string): boolean;
27/**
28 * Copy All
29 * Takes collection and copies to destination.
30 *
31 * @param copies collection of source and destination targets.
32 */
33export declare function copyAll(copies: CopyTuple[] | CopyTuple | IMap<ICopy> | string[]): void;
34/**
35 * Pkg
36 * Loads the package.json file for project or saves package.json.
37 *
38 * @param val the package.json object to be written to file.
39 */
40export declare function pkg(val?: any): any;
41/**
42 * Bump
43 * Bumps project to next version.
44 *
45 * @param filename optional filename defaults to package.json in cwd.
46 */
47export declare function bump(): {
48 name: any;
49 version: any;
50 original: any;
51};
52/**
53 * Serve
54 * Hook to Browser Sync accepts name and options returning a Browser Sync Server Instance.
55 * @see https://www.browsersync.io/docs/api
56 *
57 * @param name the name of the server or Browser Sync options.
58 * @param options the Browser Sync Options.
59 */
60export declare function serve(name?: string | Options, options?: Options | boolean, init?: boolean): BrowserSyncInstance;
61/**
62 * Layout
63 * Creates a CLI layout much like creating divs in the terminal.
64 * Supports strings with \t \s \n or IUIOptions object.
65 * @see https://www.npmjs.com/package/cliui
66 *
67 * @param width the width of the layout.
68 * @param wrap if the layout should wrap.
69 */
70/**
71 * String Builder
72 * Builds string then joins by char with optional colorization.
73 *
74 * @param str the base value to build from if any.
75 */
76/**
77 * String Format
78 * Very simple string formatter by index.
79 * Supports using %s or %n chars.
80 *
81 * @private
82 * @param str the string to be formatted.
83 * @param args arguments used for formatting.
84 */
85/**
86 * Platform
87 * Gets information and paths for the current platform.
88 */
89export declare function platform(): {
90 platform: any;
91 arch: string;
92 release: string;
93 hostname: string;
94 homedir: string;
95 cpu: ICpu;
96};