/** * Copyright (c) 2017-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import _ from 'lodash'; export declare function generate(generatedFilesDir: string, file: string, content: any, skipCache?: boolean): Promise; export declare function objectWithKeySorted(obj: Object): _.Dictionary; /** * Convert filepath to url path. Example: 'index.md' -> '/', 'foo/bar.js' -> '/foo/bar', */ export declare function fileToPath(file: string): string; export declare function encodePath(userpath: string): string; /** * Given an input string, convert to kebab-case and append a hash. Avoid str collision */ export declare function docuHash(str: string): string; /** * Generate unique React Component Name. E.g: /foo-bar -> FooBar096 */ export declare function genComponentName(pagePath: string): string; /** * Convert Windows backslash paths to posix style paths. E.g: endi\\lie -> endi/lie */ export declare function posixPath(str: string): string; /** * Generate unique chunk name given a module path */ export declare function genChunkName(modulePath: string, prefix?: string, preferredName?: string, shortId?: boolean): string; export declare function idx(target: any, keyPaths?: string | (string | number)[]): any; /** * Given a filepath and dirpath, get the first directory */ export declare function getSubFolder(file: string, refDir: string): string | null; export declare function parse(fileString: string): { frontMatter: { [key: string]: any; }; content: string; excerpt: string | undefined; }; export declare function normalizeUrl(rawUrls: string[]): string; //# sourceMappingURL=index.d.ts.map