-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitit.config.ts
51 lines (45 loc) · 1.4 KB
/
gitit.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import type { GitItConfig } from './src/types'
import process from 'node:process'
// Configuration for gitit
const config: GitItConfig = {
// Standard options
verbose: true,
dir: './',
force: false,
forceClean: false,
shell: false,
install: true,
command: '',
auth: '',
cwd: process.cwd(),
offline: false,
preferOffline: false,
// The hooks system allows you to customize the template download process
// Hooks are called at specific points in the template download and extraction workflow
hooks: {
// Before downloading a template
beforeDownload: (template, options) => {
console.log(`About to download template: ${template}`)
return { template, options }
},
// After dependencies are installed
afterInstall: async (result) => {
console.log('Dependencies installed, running custom logic...')
return result
},
// Other available hooks:
// - afterDownload: Called after template has been downloaded
// - beforeExtract: Called before template is extracted
// - afterExtract: Called after template is extracted
// - beforeInstall: Called before dependencies are installed
},
// You can also register plugins for even more extensibility
// plugins: [
// // A plugin with no options
// myCustomPlugin,
//
// // A plugin with options
// [anotherPlugin, { customOption: true }]
// ]
}
export default config