Skip to content

Commit

Permalink
More work on license part
Browse files Browse the repository at this point in the history
Refs #11.
  • Loading branch information
franzliedke committed Apr 11, 2016
1 parent cce6008 commit a740716
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions src/Parts/License/Part.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,22 @@ public function setupPackage($composer, Directory $target)
if ($this->input->confirm('Do you want to configure a license for your project?')) {
$licenses = new SpdxLicenses();

// 1. Choose a license from a list
// 2. Generate the license file, with year and name
// 3. Add it to composer.json
$license = $this->selectLicenseFromList($licenses);

$this->copyLicenseFileTo($target, $license);

$composer->license = $license;
}
}

protected function selectLicenseFromList($licenses)
{
// Ask the user to chosse a license from the list
}

protected function copyLicenseFileTo(Directory $target, $license)
{
// Download the file
// Add year and name
}
}

0 comments on commit a740716

Please sign in to comment.