This repository was archived by the owner on Feb 3, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change 2828 },
2929 "dependencies" : {
3030 "inquirer" : " ^6.2.2" ,
31+ "ora" : " ^3.2.0" ,
3132 "pkg-install" : " ^1.0.0" ,
3233 "yargs" : " ^12.0.5"
3334 },
Original file line number Diff line number Diff line change 99const {
1010 installDependencies
1111} = require ( './create-twilio-function/install-dependencies' ) ;
12+ const ora = require ( 'ora' ) ;
1213
1314async function createTwilioFunction ( config ) {
1415 const projectDir = `${ config . path } /${ config . name } ` ;
@@ -19,6 +20,7 @@ async function createTwilioFunction(config) {
1920 config = { ...accountDetails , ...config } ;
2021
2122 // Scaffold project
23+ const spinner = ora ( 'Creating project directories and files' ) . start ( ) ;
2224 await createDirectory ( projectDir , 'functions' ) ;
2325 await createDirectory ( projectDir , 'assets' ) ;
2426 await createEnvFile ( projectDir , {
@@ -28,9 +30,12 @@ async function createTwilioFunction(config) {
2830 await createGitignore ( projectDir ) ;
2931 await createExampleFunction ( `${ projectDir } /functions` ) ;
3032 await createPackageJSON ( projectDir , config . name ) ;
33+ spinner . succeed ( ) ;
3134
3235 // Install dependencies with npm
36+ spinner . start ( 'Installing dependencies' ) ;
3337 await installDependencies ( projectDir ) ;
38+ spinner . succeed ( ) ;
3439 } catch ( e ) {
3540 console . log (
3641 `A directory called '${
You can’t perform that action at this time.
0 commit comments