From a14e675faec1227d358d4e3ce5fedf5dc5ee609d Mon Sep 17 00:00:00 2001 From: Yuki Takemoto Date: Sun, 8 Mar 2020 12:51:45 +0900 Subject: [PATCH] chore(gatsby): Convert clean to typescript (#22036) --- packages/gatsby/src/commands/{clean.js => clean.ts} | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) rename packages/gatsby/src/commands/{clean.js => clean.ts} (67%) diff --git a/packages/gatsby/src/commands/clean.js b/packages/gatsby/src/commands/clean.ts similarity index 67% rename from packages/gatsby/src/commands/clean.js rename to packages/gatsby/src/commands/clean.ts index 689a9edf4b7f7..bd99e89089b5c 100644 --- a/packages/gatsby/src/commands/clean.js +++ b/packages/gatsby/src/commands/clean.ts @@ -1,12 +1,14 @@ -const fs = require(`fs-extra`) -const path = require(`path`) +import fs from "fs-extra" +import path from "path" + import { userPassesFeedbackRequestHeuristic, showFeedbackRequest, } from "../utils/feedback" +import { IProgram } from "./types" -module.exports = async function clean(args) { - const { directory, report } = args +module.exports = async function clean(program: IProgram): Promise { + const { directory, report } = program const directories = [`.cache`, `public`]