Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.then(() => {
// Create release commit
const {version} = getPackageJson(cwd, true)
return serialSpawn(
[['git', [`commit -m "release(${packageScope}): v${version}"`]]],
{cwd}
)
})
.then(() => serialSpawn(docCommands))
.then(() => {
// Create release tag
const {version} = getPackageJson(cwd)
return serialSpawn(
[['git', [`tag -a ${tagPrefix}${version} -m "v${version}"`]]],
{cwd}
)
})
.then(() => serialSpawn(publishCommands, {cwd}))
path: publicPath,
args: [entry],
root = false
} = program
if (!output) {
showError(new Error('--output is mandatory.'), program)
}
if (!entry) {
showError(new Error('Please provide an entry file path.'), program)
}
process.env.NODE_ENV = process.env.NODE_ENV || 'production'
const version = getPackageJson(process.cwd()).version
const outputFolder = path.join(
process.cwd(),
output,
path.sep,
root ? '' : version
)
const webpackConfig = Object.assign({}, config, {
entry: path.resolve(process.cwd(), entry)
})
webpackConfig.output.publicPath = publicPath + version + '/'
webpackConfig.output.path = outputFolder
if (clean) {
showInfo(`Removing previous build in ${output}...`)
rimraf.sync(outputFolder)
}