adventofcode/preset/year/preset.ts
2023-12-01 12:39:32 -05:00

31 lines
630 B
TypeScript

import path from 'path';
//import { definePreset } from '@preset/core';
export default definePreset({
name: 'year',
options: {
// ...
},
handler: async(context) => {
await extractTemplates();
await editFiles({
files: [
'package.json',
'Taskfile.yaml',
],
operations: [ {type: 'replace-variables',
variables: {
year: context.prompts.year
}}]
});
await installPackages({
for: 'node',
packages: [ 'vitest' ],
packageManager: 'pnpm',
});
},
})