Replies: 1 comment 5 replies
-
If you can be more specific, I can help. Here is how to apply a preset programmatically: import path from 'node:path'
import { applyPreset, emitter } from '@preset/core'
async function main() {
emitter.on('action:start', (action) => {
console.log(action.name, 'started')
})
emitter.on('preset:start', (preset) => {
console.log(preset.name, 'is being applied')
})
emitter.on('preset:end', (preset) => {
console.log('Preset finished:', preset)
})
await applyPreset({
resolvable: 'innocenzi/config',
parsedOptions: { ssh: false},
rawArguments: ['--eslint'],
targetDirectory: path.resolve('target'),
})
}
main().catch(console.log) As you can see, you can get data from what's happening through events. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Looking for some examples for programmatic usage
Beta Was this translation helpful? Give feedback.
All reactions