@@ -2,6 +2,7 @@ import { dirname, join } from "node:path";
22import { readFileSync } from "node:fs" ;
33import { readFile , rm } from "node:fs/promises" ;
44import { copy , json , pkg , type Skeleton } from "code-skeleton" ;
5+ import { mustache } from "./mustache" ;
56
67const ownPkg = JSON . parse (
78 readFileSync ( join ( dirname ( __dirname ) , "package.json" ) , { encoding : "utf8" } )
@@ -10,6 +11,7 @@ const ownPkg = JSON.parse(
1011interface Variables {
1112 dogfood ?: boolean ;
1213 library ?: boolean ;
14+ ci ?: object ;
1315}
1416
1517export default async function ( root : string , variables : Variables ) {
@@ -51,12 +53,14 @@ export default async function (root: string, variables: Variables) {
5153 } ,
5254 types : "lib/index.d.ts" ,
5355 devDependencies : {
54- "@tsconfig/node18" : "^2.0.0" ,
56+ "@tsconfig/node18" : "^18.0.0" ,
57+ "@types/mustache" : "^4.0.0" ,
5558 "@types/node" : "^18.0.0" ,
5659 "@types/tap" : "^15.0.0" ,
5760 "@typescript-eslint/eslint-plugin" : "^5.0.0" ,
5861 "@typescript-eslint/parser" : "^5.0.0" ,
5962 "eslint" : "^8.0.0" ,
63+ "mustache" : "^4.0.0" ,
6064 "tap" : "^16.0.0" ,
6165 "ts-node" : "^10.0.0" ,
6266 "typescript" : "^5.0.0"
@@ -94,7 +98,7 @@ export default async function (root: string, variables: Variables) {
9498 ".eslintrc.js" : copy ( join ( __dirname , "content" , "eslintrc.js" ) ) ,
9599 ".gitignore" : copy ( join ( __dirname , "content" , "gitignore" ) ) ,
96100 "scripts/clean.ts" : copy ( join ( __dirname , "content" , "clean.ts" ) ) ,
97- ".github/workflows/ci.yml" : copy ( join ( __dirname , "content" , "ci.yml" ) ) ,
101+ ".github/workflows/ci.yml" : mustache ( join ( __dirname , "content" , "ci.yml" ) , variables . ci ) ,
98102 ".github/matchers/tap.json" : copy ( join ( __dirname , "content" , "tap.json" ) ) ,
99103 } ;
100104
0 commit comments