@@ -2,6 +2,7 @@ import { dirname, join } from "node:path";
2
2
import { readFileSync } from "node:fs" ;
3
3
import { readFile , rm } from "node:fs/promises" ;
4
4
import { copy , json , pkg , type Skeleton } from "code-skeleton" ;
5
+ import { mustache } from "./mustache" ;
5
6
6
7
const ownPkg = JSON . parse (
7
8
readFileSync ( join ( dirname ( __dirname ) , "package.json" ) , { encoding : "utf8" } )
@@ -10,6 +11,7 @@ const ownPkg = JSON.parse(
10
11
interface Variables {
11
12
dogfood ?: boolean ;
12
13
library ?: boolean ;
14
+ ci ?: object ;
13
15
}
14
16
15
17
export default async function ( root : string , variables : Variables ) {
@@ -51,12 +53,14 @@ export default async function (root: string, variables: Variables) {
51
53
} ,
52
54
types : "lib/index.d.ts" ,
53
55
devDependencies : {
54
- "@tsconfig/node18" : "^2.0.0" ,
56
+ "@tsconfig/node18" : "^18.0.0" ,
57
+ "@types/mustache" : "^4.0.0" ,
55
58
"@types/node" : "^18.0.0" ,
56
59
"@types/tap" : "^15.0.0" ,
57
60
"@typescript-eslint/eslint-plugin" : "^5.0.0" ,
58
61
"@typescript-eslint/parser" : "^5.0.0" ,
59
62
"eslint" : "^8.0.0" ,
63
+ "mustache" : "^4.0.0" ,
60
64
"tap" : "^16.0.0" ,
61
65
"ts-node" : "^10.0.0" ,
62
66
"typescript" : "^5.0.0"
@@ -94,7 +98,7 @@ export default async function (root: string, variables: Variables) {
94
98
".eslintrc.js" : copy ( join ( __dirname , "content" , "eslintrc.js" ) ) ,
95
99
".gitignore" : copy ( join ( __dirname , "content" , "gitignore" ) ) ,
96
100
"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 ) ,
98
102
".github/matchers/tap.json" : copy ( join ( __dirname , "content" , "tap.json" ) ) ,
99
103
} ;
100
104
0 commit comments