{"version":3,"sources":["jsdelivr-header.js","/npm/generator-leadpages@1.1.2/app/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aAEA,IAAI,WAAa,QAAQ,oBACrB,KAAO,QAAQ,QACf,KAAO,QAAQ,QACf,MAAQ,QAAQ,SAChB,MAAQ,QAAQ,SAChB,GAAK,QAAQ,MACb,KAAO,QAAQ,iBAAiB,KAChC,SAAW,QAAQ,sBAGvB,OAAO,QAAU,WAAW,KAAK,OAAO,CAEpC,WAAY,WAGR,KAAK,IAAI,MACL,mBAAqB,MAAM,MAAM,KAAK,kBAAoB,MAAM,OAAO,yBAA2B,eAItG,KAAK,IAAI,MAAM,MAAM,+BAErB,IAAI,EAAO,KAAK,QAEhB,KAAK,OAAO,YAAa,uBAAwB,UAAU,WAAY,IAAG,GAC1E,KAAK,OAAO,YAAa,8BAA+B,UAAU,WAC9D,GACJ,IAAG,EAGP,EAEA,UAAW,WACP,IAAI,EAAO,KAAK,QAEZ,EAAU,CAAC,CACP,KAAM,aACN,QAAS,0DACT,QAAS,SAAS,YAEtB,CACI,KAAM,eACN,QAAS,gCACT,QAAS,SAAS,cAEtB,CACI,KAAM,cACN,KAAM,UACN,QAAS,oEACT,SAAS,GAEb,CACI,KAAM,OACN,KAAM,UACN,QAAS,+CACT,SAAS,GAEb,CACI,KAAM,SAAS,GACX,OAAO,EAAS,IACpB,EACA,KAAM,gBACN,KAAM,OACN,QAAS,yBACT,QAAS,CAAC,CACF,KAAM,OACN,MAAO,OACP,SAAS,GACV,CACC,KAAM,OACN,MAAO,OACP,SAAS,GACV,CACC,KAAM,YACN,MAAO,OACP,SAAS,KAKrB,CACI,KAAM,YACN,KAAM,UACN,QAAS,oDACT,SAAS,GAEb,CACC,KAAM,MACN,KAAM,UACN,QAAS,+BACT,SAAS,IAId,KAAK,OAAO,EAAS,SAAS,GAE1B,KAAK,WAAa,EAAM,WACxB,KAAK,aAAe,EAAM,aAC1B,KAAK,YAAc,EAA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qC,QAAtB,EAAK,cAA0B,SAAW,SACzD,EAAuC,QAAtB,EAAK,cAA0B,UAAY,UAChE,KAAK,UAAU,EAAa,uBAAuB,EACvD,CAIA,EAAK,WACL,KAAK,uCAGN,EAAK,IACP,KAAK,+DAEF,KAAK,gBAGb,GAAG,IACP,GAGJ,IAAK,CAED,QAAS,WACL,IAAI,EAAO,KACX,YAAW,WACV,EAAK,IACD,MAAM,MAAM,MAAM,iCAEvB,GAAG,IACP","file":"/npm/generator-leadpages@1.1.2/app/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/generator-leadpages@1.1.2/app/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","'use strict';\n\nvar generators = require('yeoman-generator'),\n    util = require('util'),\n    path = require('path'),\n    chalk = require('chalk'),\n    yosay = require('yosay'),\n    fs = require('fs'),\n    exec = require('child_process').exec,\n    defaults = require('./configs/defaults');\n\n\nmodule.exports = generators.Base.extend({\n\n    initialize: function() {\n\n        //Greeting\n        this.log(yosay(\n            'Welcome to the\\n' + chalk.green.bold('LeadPages(TM) ') + chalk.yellow('Template Starter Kit ') + 'generator!'\n        ));\n\n        //Cache the repos\n        this.log(chalk.green('Caching necessary files...'));\n\n        var done = this.async();\n\n        this.remote('LeadPages', 'LeadPagesBuildSystem', 'yeoman', function() {}, true);\n        this.remote('LeadPages', 'LeadPagesTemplateStarterKit', 'yeoman', function() {\n            done();\n        }, true);\n\n\n    },\n\n    prompting: function() {\n        var done = this.async();\n\n        var prompts = [{\n                name: 'templateId',\n                message: 'Please give this template an UNIQUE ID (Ex: WEBINAR-01)',\n                default: defaults.templateId\n            },\n            {\n                name: 'templateName',\n                message: 'What is your template\\'s name?',\n                default: defaults.templateName\n            },\n            {\n                name: 'sampleCodes',\n                type: 'confirm',\n                message: 'Would you like to include the LeadPages(TM) Template Starter Kit?',\n                default: false\n            },\n            {\n                name: 'gulp',\n                type: 'confirm',\n                message: 'Include Gulp tasks to make your life easier?',\n                default: true\n            },\n            {\n                when: function(repsonse) {\n                    return repsonse.gulp;\n                },\n                name: 'preprocessors',\n                type: 'list',\n                message: 'Include the following?',\n                choices: [{\n                        name: 'SASS',\n                        value: 'sass',\n                        checked: true\n                    }, {\n                        name: 'LESS',\n                        value: 'less',\n                        checked: false\n                    }, {\n                        name: 'No thanks',\n                        value: 'none',\n                        checked: false\n                    }\n         \t\t]\n\n            },\n            {\n                name: 'compileJS',\n                type: 'confirm',\n                message: 'Do you want to combine all js into a single file?',\n                default: true\n            },\n            {\n            \tname: 'git',\n            \ttype: 'confirm',\n            \tmessage: 'Initialize a Git repository?',\n            \tdefault: true\n            }\n        ];\n\n        this.prompt(prompts, function(props) {\n\n            this.templateId = props.templateId;\n            this.templateName = props.templateName;\n            this.sampleCodes = props.sampleCodes;\n            this.gulp = props.gulp;\n            this.compileJS = props.compileJS;\n            this.git = props.git;\n\n            if (this.gulp) {\n                this.preprocessors = props.preprocessors;\n            }\n\n            done();\n        }.bind(this));\n    },\n\n    writing: {\n\n        scaffolding: function() {\n            var self = this;\n\n            var finish = this.async();\n\n            var templates = {\n                template_id: this.templateId,\n                template_name: this.templateName\n            };\n\n            if (this.sampleCodes) {\n\n                //Copy from cached files\n                var cloneSkeleton = this.remote('LeadPages', 'LeadPagesBuildSystem', 'yeoman', function(err, remote) {\n                    remote.directory('.', '.');\n                }, false);\n\n                //Overwrite Skeleton with sample codes\n                var cloneSample = this.remote('LeadPages', 'LeadPagesTemplateStarterKit', 'yeoman', function(err, remote) {\n                    remote.directory('leadpages-template', 'leadpages-template');\n                    remote.template('leadpages-template/index.html', 'leadpages-template/index.html', templates);\n                    remote.template('leadpages-template/meta/template.json', 'leadpages-template/meta/template.json', templates);\n                    finish();\n                }, false);\n\n                //User wants both TSK and SASS/LESS. Make a copy of style.css and move to the proper folder\n                if(!!self.preprocessors) {\n                    var moveCssTo = self.preprocessors === 'sass' ? 'scss' : 'less';\n                    var cmd = 'cp leadpages-template/css/style.css '+moveCssTo+'/template-starter-kit.'+moveCssTo;\n                        cmd+=' && mv '+moveCssTo+'/template-starter-kit.css '+moveCssTo+'/template-starter-kit.'+moveCssTo;\n                    setTimeout(function(){\n                        self.log(chalk.green('\\nMoving leadpages-template/css/style.css to '+moveCssTo+'/template-starter-kit.'+moveCssTo+'\\n'));\n                        exec(cmd);\n                    }, 500);\n                }\n\n                //If user wants TSK and concat the JS files, make a copy of functions.js so concat won't overwrite it\n                if(self.compileJS) {\n                    exec('cp leadpages-template/js/functions.js ./scripts/app/')\n                }\n\n            } else {\n                var cloneSkeleton = this.remote('LeadPages', 'LeadPagesBuildSystem', 'yeoman', function(err, remote) {\n                    remote.directory('.', '.');\n                    remote.template('leadpages-template/index.html', 'leadpages-template/index.html', templates);\n                    remote.template('leadpages-template/meta/template.json', 'leadpages-template/meta/template.json', templates);\n                    finish();\n                }, false);\n            }\n\n        }\n    },\n\n    install: {\n        installGulp: function() {\n            if (this.gulp) {\n                var self = this;\n\n                self.log(chalk.green('\\nInstalling Build System packages...\\n'));\n                self.npmInstall();\n            }\n        },\n\n        //TODO: Install vendor scripts. jQuery etc...\n\n        cleanUp: function(){\n        \tvar self = this;\n            setTimeout(function() {\n\n                exec('rm .DS_store');\n\n                if (!self.gulp) {\n                    exec('rm gulpfile.js package.json && rm -rf ./gulp ./scripts ./scss ./less');\n                }\n\n                if(!!self.preprocessors){\n\n                    if(self.preprocessors === 'none'){\n                        exec('rm -rf less scss && rm ./gulp/tasks/less.js ./gulp/tasks/sass.js');\n                    } else {\n                        var removeFolder = self.preprocessors == 'sass' ? './less' : './scss',\n                            removeGulpTask = self.preprocessors == 'sass' ? 'less.js' : 'sass.js'\n                        exec('rm -rf '+removeFolder+' && rm ./gulp/tasks/'+removeGulpTask);\n                    }\n                }\n\n                //Remove the ./scripts folder if user don't want to combine js into a single file\n                if(!self.compileJS) {\n                    exec('rm -rf scripts gulp/tasks/concat.js');\n                }\n\n                if(self.git){\n                \texec('echo \"\\n\\n.DS_store\" >> .gitignore && git init && git add .');\n                } else {\n                    exec('rm .gitignore');\n                }\n\n            }, 1000);\n        },\n    },\n\n    end: {\n\n        goodbye: function(){\n            var self = this;\n            setTimeout(function(){\n            \tself.log(\n            \t    yosay(chalk.green(\"I'm all done! Happy Hacking!\"))\n            \t);\n            }, 1000);\n        }\n    }\n\n\n});"]}