-
Notifications
You must be signed in to change notification settings - Fork 879
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Refactor prompts.js and index.js
Refactor the prompts.js and index.js files in the template/plugins/compile-js directory. The changes include fixing indentation and formatting issues, as well as updating variable names and adding comments for clarity.
- Loading branch information
1 parent
1b6e7e7
commit 3d13d7a
Showing
4 changed files
with
73 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module.exports = { | ||
type: 'confirm', | ||
color: 'blue', | ||
message: '📘 Using typescript ?', | ||
initial: true, | ||
type: 'confirm', | ||
color: 'blue', | ||
message: '📘 Using typescript ?', | ||
initial: true, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
const promptsOptions = require('./_prompts'); | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires,@typescript-eslint/unbound-method | ||
const { apply } = require('./plugin'); | ||
|
||
module.exports = { | ||
name: 'printSuccess', | ||
promptsOptions, | ||
apply, | ||
name: 'printSuccess', | ||
promptsOptions, | ||
apply, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,55 @@ | ||
const { green, blue, yellow, red } = require('kleur'); | ||
|
||
module.exports = { | ||
async apply(value, previousValues) { | ||
return new Promise(resolve => { | ||
console.log('\n'); | ||
console.log( | ||
'TheCodingMachine React-Native Boilerplate initialized with success ! 🚀\n' | ||
); | ||
console.log( | ||
`${green( | ||
' .-` `:: \n' + | ||
' `///////////// `/shhhy+- ://. /sy/ /ss/ :NMN: \n' + | ||
' `sssssyhhhyhhy:` `yMMMMNNMMMd. osss: `hMMMh- .-` `+ss: +MMm/. \n' + | ||
' :MMM+----. `mMMm+:-`.oo/` osssyo` `dMMMMh- ohhh- `oyy+- sMMd/. \n' + | ||
' :MMM+` oMMN/- osssyhs`.mMMMMMh- -hds` .syy+- `hMMh:` \n' + | ||
' :MMM+` hMMd: oss-ohhhMMMhdMMh- `. +NNm/. .dMMy:` \n' + | ||
' :MMM+` oMMN/ oss-`shdMMd:dMMh- :-` sMMd/. -NMMo- \n' + | ||
' :MMM+` `mMMm/` `/+:. oss- `sdMd:.hMMh- hMys- `hMMh:` -hdy-` \n' + | ||
' :MMM+` `yMMMMdssss+ oss. `oh/- hMMh- -hyo: dMMs:` -ss+` \n' + | ||
' .oys:` .+yhyo/- -::` `` -syo- ..` +mo- `// \n' + | ||
' `` ``` `` `. ' | ||
)}` | ||
); | ||
if (previousValues.typescript) { | ||
console.log(blue(' THE TYPESCRIPT VERSION 📘')); | ||
} else { | ||
console.log(yellow(' THE JAVASCRIPT VERSION 📒')); | ||
} | ||
console.log('\n'); | ||
async apply(value, previousValues) { | ||
return new Promise((resolve) => { | ||
console.log('\n'); | ||
console.log( | ||
'TheCodingMachine React-Native Boilerplate initialized with success ! 🚀\n', | ||
); | ||
console.log( | ||
`${green( | ||
' .-` `:: \n' + | ||
' `///////////// `/shhhy+- ://. /sy/ /ss/ :NMN: \n' + | ||
' `sssssyhhhyhhy:` `yMMMMNNMMMd. osss: `hMMMh- .-` `+ss: +MMm/. \n' + | ||
' :MMM+----. `mMMm+:-`.oo/` osssyo` `dMMMMh- ohhh- `oyy+- sMMd/. \n' + | ||
' :MMM+` oMMN/- osssyhs`.mMMMMMh- -hds` .syy+- `hMMh:` \n' + | ||
' :MMM+` hMMd: oss-ohhhMMMhdMMh- `. +NNm/. .dMMy:` \n' + | ||
' :MMM+` oMMN/ oss-`shdMMd:dMMh- :-` sMMd/. -NMMo- \n' + | ||
' :MMM+` `mMMm/` `/+:. oss- `sdMd:.hMMh- hMys- `hMMh:` -hdy-` \n' + | ||
' :MMM+` `yMMMMdssss+ oss. `oh/- hMMh- -hyo: dMMs:` -ss+` \n' + | ||
' .oys:` .+yhyo/- -::` `` -syo- ..` +mo- `// \n' + | ||
' `` ``` `` `. ', | ||
)}`, | ||
); | ||
if (previousValues.typescript) { | ||
console.log(blue(' THE TYPESCRIPT VERSION 📘')); | ||
} else { | ||
console.log(yellow(' THE JAVASCRIPT VERSION 📒')); | ||
} | ||
console.log('\n'); | ||
|
||
console.log( | ||
'- 📚 If you need to read more about this boilerplate : https://thecodingmachine.github.io/react-native-boilerplate/' | ||
); | ||
console.log( | ||
'- 🤕 If you have some troubles : https://github.com/thecodingmachine/react-native-boilerplate/issues' | ||
); | ||
console.log( | ||
'- ⭐ If you love this boilerplate, give us a star, you will be a ray of sunshine in our lives :) https://github.com/thecodingmachine/react-native-boilerplate' | ||
); | ||
console.log( | ||
'- 📚 If you need to read more about this boilerplate : https://thecodingmachine.github.io/react-native-boilerplate/', | ||
); | ||
console.log( | ||
'- 🤕 If you have some troubles : https://github.com/thecodingmachine/react-native-boilerplate/issues', | ||
); | ||
console.log( | ||
'- ⭐ If you love this boilerplate, give us a star, you will be a ray of sunshine in our lives :) https://github.com/thecodingmachine/react-native-boilerplate', | ||
); | ||
|
||
if (!previousValues.typescript) { | ||
console.log('\n'); | ||
console.log( | ||
red( | ||
'🚨 You choose the javascript version, don\'t forget to run "yarn lint --fix" after the installation 🚨' | ||
) | ||
); | ||
console.log('\n'); | ||
} | ||
if (!previousValues.typescript) { | ||
console.log('\n'); | ||
console.log( | ||
red( | ||
'🚨 You choose the javascript version, don\'t forget to run "yarn lint:fix" after the installation 🚨', | ||
), | ||
); | ||
console.log('\n'); | ||
} | ||
|
||
resolve(); | ||
}); | ||
}, | ||
resolve(); | ||
}); | ||
}, | ||
}; |