fs-extra#mkdir TypeScript Examples

The following examples show how to use fs-extra#mkdir. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: generate-packages.ts    From DefinitelyTyped-tools with MIT License 6 votes vote down vote up
async function writeCommonOutputs(pkg: AnyPackage, packageJson: string, readme: string): Promise<void> {
  await mkdir(outputDirectory(pkg));

  await Promise.all([
    writeOutputFile("package.json", packageJson),
    writeOutputFile("README.md", readme),
    writeOutputFile("LICENSE", getLicenseFileText(pkg)),
  ]);

  async function writeOutputFile(filename: string, content: string): Promise<void> {
    await writeFile(await outputFilePath(pkg, filename), content);
  }
}