/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/generator-cmj@0.0.11/app/index.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
"use strict";var util=require("util"),path=require("path"),yeoman=require("yeoman-generator"),chalk=require("chalk"),NodeCoffeeGenerator=module.exports=function(e,s){yeoman.generators.Base.apply(this,arguments),this.on("end",(function(){this.installDependencies({bower:"y"===this.props.bower||"Y"===this.props.bower,skipInstall:s["skip-install"]});var e=this;this.spawnCommand("git",["init"]).on("close",(function(){setTimeout((function(){e.props.heroku&&(console.log(chalk.magenta("-----\x3e Setting up heroku...")),e.spawnCommand("heroku",["config:add","BUILDPACK_URL=https://github.com/mbuchetics/heroku-buildpack-nodejs-grunt.git"])),e.props.dokku&&(console.log(chalk.magenta("-----\x3e Setting up dokku...")),e.spawnCommand("git",["remote","add","dokku","dokku@apps.rgaus.net:"+e.props.name])),console.log(chalk.magenta("-----\x3e Making first commit...")),e.spawnCommand("git",["add","."]),e.spawnCommand("git",["commit","-m","initial_commit"])}),1e3)}))})),this.pkg=JSON.parse(this.readFileAsString(path.join(__dirname,"../package.json")))};util.inherits(NodeCoffeeGenerator,yeoman.generators.NamedBase),NodeCoffeeGenerator.prototype.askFor=function(){var e=this.async();console.log(this.yeoman+'\nThe name of your project shouldn\'t contain "node" or "js" and\nshould be a unique ID not already in use at search.npmjs.org.'+chalk.cyan("\nIf you aren't me please don't use my prepopulated information!"));var s=[{name:"name",message:"Module Name",default:path.basename(process.cwd())},{name:"description",message:"Description",default:"My New Application"},{name:"homepage",message:"Homepage"},{name:"license",message:"License",default:"MIT"},{name:"frontend",message:"Scaffold Frontend?",default:"y"},{name:"heroku",message:"Scaffold custom heroku buildpack and stuff?",default:"n"},{name:"dokku",message:"Scaffold custom dokku buildpack and stuff?",default:"n"},{name:"models",message:"Scaffold Mongoose Models?",default:"y"},{name:"githubUsername",message:"GitHub username",default:"1egoman"},{name:"authorName",message:"Author's Name",default:"Ryan Gaus"},{name:"authorEmail",message:"Author's Email",default:"rsg1egoman@gmail.com"},{name:"authorUrl",message:"Author's Homepage",default:"http://rgaus.net"}];this.currentYear=(new Date).getFullYear(),this.prompt(s,function(s){this.slugname=this._.slugify(s.name),this.camelname=this._.camelize(this.slugname),this.repoUrl="https://github.com/"+s.githubUsername+"/"+this.slugname,s.homepage||(s.homepage=this.repoUrl),s.heroku="y"===s.heroku.toLowerCase(),s.dokku="y"===s.dokku.toLowerCase(),s.models="y"===s.models.toLowerCase(),this.props=s;var o=this;"y"===this.props.frontend||"Y"===this.props.frontend?(this.props.frontend=!0,this.prompt([{name:"bodyparser",message:"Which bodyparser should I use? (form, json, or none)",default:"json"},{name:"bower",message:"Should I set up bower?",default:"y"},{name:"views",message:"Scaffold views?",default:"y"}],(function(s){o.props.bodyparser=s.bodyparser,o.props.bower=s.bower,o.props.views=s.views,e()}))):(this.props.frontend=!1,e())}.bind(this))},NodeCoffeeGenerator.prototype.lib=function(){this.mkdir("src"),this.template("src/name.coffee","src/index.coffee"),this.props.models&&(this.template("src/db.coffee","src/db.coffee"),this.template("src/models/model.coffee","src/models/model.coffee")),this.props.heroku&&this.copy("Procfile"),this.props.dokku&&this.copy("_env",".env")},NodeCoffeeGenerator.prototype.models=function(){this.props.models&&(this.mkdir("src/models"),this.template("src/models/model.coffee","src/models/schema.coffee"))},NodeCoffeeGenerator.prototype.test=function(){this.mkdir("test"),this.mkdir("test/src"),this.mkdir("test/support"),this.copy("test/support/globals.js","test/support/globals.js"),this.copy("test/support/runner.js","test/support/runner.js"),this.template("test/src/specs/name.spec.coffee","test/src/specs/"+this.slugname+".spec.coffee")},NodeCoffeeGenerator.prototype.projectfiles=function(){this.copy("jshintrc",".jshintrc"),this.copy("gitignore",".gitignore"),this.copy("travis.yml",".travis.yml"),this.template("README.md"),this.template("Gruntfile.js"),this.template("_package.json","package.json")},NodeCoffeeGenerator.prototype.frontend=function(){this.props.frontend&&(this.mkdir("public"),this.mkdir("public/sass"),this.props.bower&&(this.copy("_bowerrc",".bowerrc"),this.template("_bower.json","bower.json")),this.template("public/index.scss","public/sass/index.scss"),this.directory("public/bootstrap","public/sass/bootstrap"),this.copy("public/_bootstrap.scss","public/sass/_bootstrap.scss"),this.props.views&&(this.copy("views/index.ejs","views/index.ejs"),this.directory("views/partials","views/partials")))};
//# sourceMappingURL=/sm/448d6160a955052104f3cc7b33c56bfe201a902807f876a2ba2a32ed1f188945.map