diff --git a/app/index.js b/app/index.js index 332ee7c..6909cd8 100644 --- a/app/index.js +++ b/app/index.js @@ -299,6 +299,14 @@ Generator.prototype.doNotFearCommitment = function() { }.bind(this)); }; +// Create a composer.json +Generator.prototype.createComposerJson = function() { + if (this.config.get('addComposer')) { + this.logger.log("Adding composer.json"); + this.fs.copyTpl(this.templatePath('composer.json.tmpl'), this.destinationPath('composer.json'), { conf: this.conf }); + } +} + // Set some permissions /* @TODO Thinking that maybe permissions should be left up to the user BUT, it seems that the theme stuff needs some permissions set to work.... diff --git a/app/prompts.js b/app/prompts.js index 4d35ac7..36c61df 100644 --- a/app/prompts.js +++ b/app/prompts.js @@ -138,6 +138,11 @@ module.exports = function(advanced, defaults) { name: 'installTheme', type: 'confirm', default: (typeof defaults.installTheme !== 'undefined') ? defaults.installTheme : true + }, { + message: 'Add composer.json?', + name: 'addComposer', + type: 'confirm', + default: (typeof defaults.addComposer !== 'undefined') ? defaults.addComposer : false }, { message: 'Destination directory', name: 'themeDir',