stalbert
05/27/2020, 2:53 PMsuitecloud
).Ali Syed (NS DevTools QA)
05/27/2020, 7:53 PMsuitecloud
-> sc
😄stalbert
05/27/2020, 8:22 PMAlbert Margarit (NS Eng Lead)
05/27/2020, 8:37 PMsuitecloud.config.js
to add that layer:
This should work:
const prompts = require('prompts');
module.exports = {
defaultProjectFolder: 'src',
commands: {
'project:deploy': {
projectFolder: 'dist',
beforeExecuting: async options => {
const response = await prompts({
type: 'confirm',
name: 'value',
message: 'Are you sure you want to deploy?',
});
if (!response.value) {
throw 'Stopping deployment!';
}
return options;
},
},
},
};
You need to install the prompts library in your project:
npm install prompts -D
Albert Margarit (NS Eng Lead)
05/27/2020, 8:38 PM