UNPKG

generator-portals-clientside

Version:

Generates a SharePoint clientside project skeleton. Brought to you by Skyline's Portals & Collaboration Team.

28 lines (25 loc) 1.11 kB
var Generator = require('yeoman-generator'); var generator = Generator.extend({ prompting: require("./prompting"), writing: require("./writing"), install: function() { if (this.params.hasGit) { this.spawnCommand("powershell", [`cd ${this.params.projectName}; git init; git remote add origin ${this.params.gitUrl}`] ) } }, end: function() { this.log("\nYee-Haw!!!\n") this.log("Next Steps:") this.log("\t1. >>cd " + this.params.projectName); this.log("\t2. >>npm install\t\t<--- Download your dependencies") this.log("\t3. >>npm run build\t\t<--- Bundle your JS and CSS") this.log("\t4. >>npm run deploy\t\t<--- Upload your code to SharePoint") this.log("\t5. >>npm run spinstall\t\t<--- Connect to SharePoint and inject your code") if (!this.params.hasGit) { this.log("\nYou can add GIT later with:") this.log("\t>>git init") this.log("\t>>git remote add origin {GIT_REPO_URL}") } }, }); module.exports = generator;