File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import { addGitAttributesStep } from "./steps/add-git-attributes"
99import { addGithubWorkflowStep } from "./steps/add-github-workflow"
1010import { addReadmeStep } from "./steps/add-readme/add-readme"
1111import { addBaseBabelConfigStep } from "./steps/babel/add-base-babel-config"
12+ import { removeBaseBabelConfigStep } from "./steps/babel/remove-base-babel-config copy"
1213import { copyAssetsStep } from "./steps/copy-assets"
1314import { createNextAppStep } from "./steps/create-next-app"
1415import { formatProjectStep } from "./steps/format-project"
@@ -72,6 +73,9 @@ export const performSetupSteps = async (
7273 addContentStep ,
7374 addReadmeStep ,
7475
76+ // Cleanup
77+ removeBaseBabelConfigStep ,
78+
7579 // Format & initial commit
7680 formatProjectStep ,
7781 gitCommitStep ,
Original file line number Diff line number Diff line change 1+ import { promises as fs } from "fs"
2+ import { remove } from "../../../helpers/remove"
3+ import { Step } from "../../step"
4+ import { baseBabelConfigString } from "./add-base-babel-config"
5+
6+ export const removeBaseBabelConfigStep : Step = {
7+ description : "removing default Babel configuration" ,
8+
9+ shouldRun : async ( ) => {
10+ const babelConfig = await fs . readFile ( ".babelrc" )
11+ return babelConfig . toString ( ) === baseBabelConfigString
12+ } ,
13+
14+ didRun : false ,
15+
16+ run : async ( ) => {
17+ await remove ( ".babelrc" )
18+ } ,
19+ }
You can’t perform that action at this time.
0 commit comments