Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
task('build', async ctx => {
// Your build tasks
await ctx.exec('tsc')
await fs.rmrf('lib/test')
})
task<{ type: 'patch' | 'major' | 'minor' }>('publish', async ctx => {
await ctx.run('preversion', { options: { version: ctx.options.type } })
await ctx.exec(`npm version ${ctx.options.type}`)
await fs.rmrf('./lib/test')
await fs.rmrf('./es/test')
await Promise.all([
ctx.exec(`git push origin master --tags`),
ctx.exec(`npm --registry https://registry.npmjs.org/ publish`),
])
})
task<{ type: 'patch' | 'major' | 'minor' }>('publish', async ctx => {
await ctx.run('preversion', { options: { version: ctx.options.type } })
await ctx.exec(`npm version ${ctx.options.type}`)
await fs.rmrf('./lib/test')
await fs.rmrf('./es/test')
await Promise.all([
ctx.exec(`git push origin master --tags`),
ctx.exec(`npm --registry https://registry.npmjs.org/ publish`),
])
})