Skip to content

Commit

Permalink
Merge pull request #1 from akeneo-labs/jml-wip
Browse files Browse the repository at this point in the history
Usage documentation
  • Loading branch information
jmleroux committed Mar 23, 2016
2 parents a2b6296 + 4e57e98 commit c053d4f
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 54 deletions.
51 changes: 44 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,57 @@
|:----------------:|:----------------------------:|
| v0.1.* | v1.5.* |

## Installation
## Using this starter kit

Add the following dependency to your Akeneo PIM project with this shell command:
### Context
Your extension is meant to work as part of an existing PIM installation,
thus we will use PIM Community Standard Edition to host the connector.

### Initialisation
Create a new host project with the Standard Edition

```
composer create-project --prefer-dist akeneo/pim-community-standard /path/to/project "1.5.*@stable"
cd /path/to/project
```

This will download the standard edition without git informations.

Then, clone the starter kit

```
composer require akeneo-labs/extension-starter 0.1.0 --prefer-dist
```
composer require "akeneo-labs/extension-starter" "0.1.0";

### Customization
You will need to rename your extension according to the chosen name.
Let's say you work for the WorldCompany and the connector name is WorldConnector.

You will have to move your component inside the vendor directory and rename it according to what vendor name you want to use.
A widely used practice is to use your company name.

```
cd vendor
mkdir world-company
mv akeneo-labs/extension-starter world-company/world-connector
cd world-company/world-connector
mv Acme WorldCompany
```

Register your new bundle in your AppKernel.php,
Change namespaces accordingly:

```
find WorldCompany/ -name '*.php' -o -name 'composer.json' -type f -print0 | xargs -0 sed -i 's#Acme#WorldCompany#g'
cd WorldCompany/Bundle/DemoExtensionBundle/
cp doc/composer.json.dist composer.json
sed -i 's#Acme#WorldCompany#g' composer.json
sed -i 's#acme#world-company#g' composer.json
```
And finally, clean up all the starter kit initialization files:

```
$bundles = [
new Acme\Bundle\AcmeExtensionBundle\AcmeExtensionBundle(),
];
rm -f doc/*
echo '# Demo extension' > README.md
```

## Best practices
Expand Down
34 changes: 34 additions & 0 deletions doc/composer.json.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"name": "acme/demo-extension",
"type": "symfony-bundle",
"description": "your description",
"license": "OSL-3.0",
"authors": [
{
"name": "your_name <your_email_adress>"
}
],
"repositories": [
{
"type": "vcs",
"url": "https://github.com/akeneo/pim-community-dev.git",
"branch": "master"
}
],
"require": {
"akeneo/pim-community-dev": "1.5.*",
"doctrine/migrations": "1.0.0-alpha3@alpha"
},
"require-dev": {
"fabpot/php-cs-fixer": "^1.11"
},
"target-dir": "Acme/Bundle/DemoExtensionBundle",
"config": {
"bin-dir": "bin"
},
"extra": {
"branch-alias": {
"dev-master": "0.1.x-dev"
}
}
}
46 changes: 0 additions & 46 deletions doc/connector.md

This file was deleted.

1 change: 0 additions & 1 deletion doc/extension.md

This file was deleted.

0 comments on commit c053d4f

Please sign in to comment.