Skip to content
This repository has been archived by the owner on May 18, 2022. It is now read-only.

Add option to create a composer.json #196

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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....
Expand Down
5 changes: 5 additions & 0 deletions app/prompts.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down