writeProjectConfigFile () { var configJson = { 'projectName': this.options.projectName, 'qtyScreens': this.options.qtyScreens, 'markupLanguage': this.options.markupLanguage, 'frontEndFramework': this.options.frontEndFramework, 'jQuery': this.options.jQuery || this.options.frontEndFramework, 'generatedBy': 'Pixel2HTML', 'generatorVersion': pkg.version, 'generatedAt': new Date(), } this.fs.writeJSON('./.project.conf', configJson) }
writeHtmlFiles () { if (this.options.markupLanguage === 'html') { for (var i = 1; i < this.options.qtyScreens + 1; i++) { const filePath = i === 1 ? '/index.html' : '/screen-' + i + '.' + this.options.markupLanguage this.fs.copyTpl( this.templatePath('markup/_screen.' + this.options.markupLanguage + '.ejs'), this.destinationPath(this.paths.src.markup + filePath), { screenNumber: i, projectName: this.options.projectName, frontEndFramework: this.options.frontEndFramework, jQuery: this.options.jQuery } ) } } }
writeBaseScriptsFiles () { this.log(chalk.yellow('Copying js main file.')) this.fs.copyTpl( this.templatePath('scripts/app.js'), this.destinationPath(this.paths.src.scripts + '/app.js'), { projectName: this.options.projectName, frontEndFramework: this.options.frontEndFramework } ) this.fs.copyTpl( this.templatePath('scripts/index.js.ejs'), this.destinationPath(this.paths.src.scripts + '/index.js'), { projectName: this.options.projectName, frontEndFramework: this.options.frontEndFramework, jQuery: this.options.jQuery } ) if (this.options.frontEndFramework) { this.fs.copyTpl( this.templatePath('scripts/framework.js.ejs'), this.destinationPath(this.paths.src.scripts + '/framework.js'), { projectName: this.options.projectName, frontEndFramework: this.options.frontEndFramework, jQuery: this.options.jQuery } ) } }
projectName: this.options.projectName, qtyScreens: this.options.qtyScreens, frontEndFramework: this.options.frontEndFramework
paths: this.paths, projectName: this.options.projectName, frontEndFramework: this.options.frontEndFramework, jQuery: this.options.jQuery, qtyScreens: this.options.qtyScreens, this.templatePath(`dotfiles/${file}.ejs`), this.destinationPath(`.${file}`), { frontEndFramework: this.options.frontEndFramework, jQuery: this.options.jQuery
this.destinationPath('gulpfile.js'), { paths: this.paths, frontEndFramework: this.options.frontEndFramework, jQuery: this.options.jQuery, markupLanguage: this.options.markupLanguage paths: this.paths, markupLanguage: this.options.markupLanguage, frontEndFramework: this.options.frontEndFramework, jQuery: this.options.jQuery clientId: this.options.clientId, projectId: this.options.projectId, frontEndFramework: this.options.frontEndFramework, jQuery: this.options.jQuery
clientId: this.options.clientId, projectId: this.options.projectId, frontEndFramework: this.options.frontEndFramework, jQuery: this.options.jQuery frontEndFramework: this.options.frontEndFramework, jQuery: this.options.jQuery