|
|
@ -138,12 +138,24 @@ const tasks = {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Install Yarn
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
installYarn() {
|
|
|
|
|
|
|
|
ora.text = 'Installing Yarn...'
|
|
|
|
|
|
|
|
return exec.stdout('npm', ['install', '-g', 'yarn'], {
|
|
|
|
|
|
|
|
cwd: installDir
|
|
|
|
|
|
|
|
}).then(results => {
|
|
|
|
|
|
|
|
ora.text = 'Yarn installed successfully.'
|
|
|
|
|
|
|
|
return true
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Install npm dependencies
|
|
|
|
* Install npm dependencies
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
installDependencies() {
|
|
|
|
installDependencies() {
|
|
|
|
ora.text = 'Installing Wiki.js npm dependencies...'
|
|
|
|
ora.text = 'Installing Wiki.js npm dependencies...'
|
|
|
|
return exec.stdout('npm', ['install', '--only=production', '--no-optional'], {
|
|
|
|
return exec.stdout('yarn', ['install', '--production', '--ignore-optional'], {
|
|
|
|
cwd: installDir
|
|
|
|
cwd: installDir
|
|
|
|
}).then(results => {
|
|
|
|
}).then(results => {
|
|
|
|
ora.text = 'Wiki.js npm dependencies installed successfully.'
|
|
|
|
ora.text = 'Wiki.js npm dependencies installed successfully.'
|
|
|
@ -247,6 +259,9 @@ Promise.join(
|
|
|
|
}).then(() => {
|
|
|
|
}).then(() => {
|
|
|
|
isContainerBased && console.info('>> Creating config file...')
|
|
|
|
isContainerBased && console.info('>> Creating config file...')
|
|
|
|
return tasks.ensureConfigFile()
|
|
|
|
return tasks.ensureConfigFile()
|
|
|
|
|
|
|
|
}).then(() => {
|
|
|
|
|
|
|
|
isContainerBased && console.info('>> Installing Yarn...')
|
|
|
|
|
|
|
|
return tasks.installYarn()
|
|
|
|
}).then(() => {
|
|
|
|
}).then(() => {
|
|
|
|
isContainerBased && console.info('>> Installing dependencies...')
|
|
|
|
isContainerBased && console.info('>> Installing dependencies...')
|
|
|
|
return tasks.installDependencies()
|
|
|
|
return tasks.installDependencies()
|
|
|
|