Merge branch 'plugins-dev-experience' of github.com:Budibase/budibase into plugins-dev-experience
This commit is contained in:
commit
c4def9be22
|
@ -21,5 +21,6 @@ exports.runPkgCommand = async command => {
|
||||||
if (!yarn && !npm) {
|
if (!yarn && !npm) {
|
||||||
throw new Error("Must have yarn or npm installed to run build.")
|
throw new Error("Must have yarn or npm installed to run build.")
|
||||||
}
|
}
|
||||||
await exports.exec(yarn ? `yarn ${command}` : `npm run ${command}`)
|
const npmCmd = command === "install" ? `npm ${command}` : `npm run ${command}`
|
||||||
|
await exports.exec(yarn ? `yarn ${command}` : npmCmd)
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,8 +33,11 @@ async function init(opts) {
|
||||||
)
|
)
|
||||||
const version = await questions.string("Version", "1.0.0")
|
const version = await questions.string("Version", "1.0.0")
|
||||||
// get the skeleton
|
// get the skeleton
|
||||||
|
console.log(info("Retrieving project..."))
|
||||||
await getSkeleton(type, name)
|
await getSkeleton(type, name)
|
||||||
await fleshOutSkeleton(name, desc, version)
|
await fleshOutSkeleton(name, desc, version)
|
||||||
|
console.log(info("Installing dependencies..."))
|
||||||
|
await runPkgCommand("install")
|
||||||
console.log(info(`Plugin created in directory "${name}"`))
|
console.log(info(`Plugin created in directory "${name}"`))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue