Last active
November 3, 2019 10:46
-
-
Save vyuvalv/08855c36b68e5d182409b9be7fd5abf5 to your computer and use it in GitHub Desktop.
Sample of `Hello world` Generator main file js
This file contains hidden or 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
const Generator = require('yeoman-generator'); // this | |
const yosay = require('yosay'); // yeoman ascii image | |
const chalk = require('chalk'); // color text | |
const shell = require('shelljs'); // shell commands | |
module.exports = class extends Generator { | |
initializing() { | |
// Use this.log instead of console.log | |
this.log( yosay( chalk.red("Hello World") ) ); | |
// Invoke sfdx commands to map connected orgs using shelljs | |
shell.exec('sfdx force:org:list'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment