Skip to content

Commit

Permalink
generate:module - Add README
Browse files Browse the repository at this point in the history
  • Loading branch information
totten committed Oct 11, 2017
1 parent 650c46d commit 5229c07
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
Binary file added images/placeholder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/CRM/CivixBundle/Command/InitCommand.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php
namespace CRM\CivixBundle\Command;

use CRM\CivixBundle\Builder\CopyFile;
use CRM\CivixBundle\Builder\Template;
use CRM\CivixBundle\Services;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Input\InputArgument;
Expand Down Expand Up @@ -88,11 +90,14 @@ protected function execute(InputInterface $input, OutputInterface $output) {
$basedir->string('build'),
$basedir->string('templates'),
$basedir->string('xml'),
$basedir->string('images'),
$basedir->string($ctx['namespace']),
));
$ext->builders['info'] = new Info($basedir->string('info.xml'));
$ext->builders['module'] = new Module(Services::templating());
$ext->builders['license'] = new License($licenses->get($ctx['license']), $basedir->string('LICENSE.txt'), FALSE);
$ext->builders['readme'] = new Template('readme.md.php', $basedir->string('README.md'), FALSE, Services::templating());
$ext->builders['screenshot'] = new CopyFile(dirname(dirname(dirname(dirname(__DIR__)))) . '/images/placeholder.png', $basedir->string('images/screenshot.png'), FALSE);

$ext->loadInit($ctx);
$ext->save($ctx, $output);
Expand Down
45 changes: 45 additions & 0 deletions src/CRM/CivixBundle/Resources/views/Code/readme.md.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# <?php echo $fullName; ?>


![Screenshot](/images/screenshot.png)

(*FIXME: In one or two paragraphs, describe what the extension does and why one would download it. *)

The extension is licensed under [<?php echo $license ?>](LICENSE.txt).

## Requirements

* PHP v5.4+
* CiviCRM (*FIXME: Version number*)

## Installation (Web UI)

This extension has not yet been published for installation via the web UI.

## Installation (CLI, Zip)

Sysadmins and developers may download the `.zip` file for this extension and
install it with the command-line tool [cv](https://github.com/civicrm/cv).

```bash
cd <extension-dir>
cv dl <?php echo $fullName; ?>@https://github.com/FIXME/<?php echo $fullName; ?>/archive/master.zip
```

## Installation (CLI, Git)

Sysadmins and developers may clone the [Git](https://en.wikipedia.org/wiki/Git) repo for this extension and
install it with the command-line tool [cv](https://github.com/civicrm/cv).

```bash
git clone https://github.com/FIXME/<?php echo $fullName; ?>.git
cv en <?php echo $mainFile . "\n"; ?>
```

## Usage

(* FIXME: Where would a new user navigate to get started? What changes would they see? *)

## Known Issues

(* FIXME *)

0 comments on commit 5229c07

Please sign in to comment.