Skip to content

Commit 36c4dac

Browse files
author
Josh Miller
committed
WIP, initial summary and readme text. Borrowing from the rules doc for contributing section, still needs edits
1 parent d3f4033 commit 36c4dac

13 files changed

+168
-6
lines changed

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,6 @@ _book
1313
# eBook build output
1414
*.epub
1515
*.mobi
16-
*.pdf
16+
*.pdf
17+
18+
.DS_Store

README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
# Drupal Commerce Documentation
1+
# Drupal Commerce 2.x Documentation
22

33
This documentation is rendered online at http://docs.drupalcommerce.org
44

55
## Contribute
66

77
We love contributors! Please help us improve or fix the documentation by opening Pull Request. Each Pull Request is automatically built by [Platform.sh](https://platform.sh).
88

9+
If you have trouble understanding any part of the documentation, please notify those of us who work on this section by creating an issue on our [Drupal Commerce 2.x documentation repository](https://github.com/commercegus/commerce-docs) and clearly explain what you don't understand and why - we're happy to hear from you, your contribution helps everyone at Drupal!
10+
11+
You can also contribute directly on our [Drupal Commerce 2.x documentation repository](https://github.com/commerceguys/commerce-docs) by editing the files through the [GitHub](https://github.com/) interface directly in your browser. Alternatively, you can clone the repository and edit the book in your favorite text editor or in the official [GitBook desktop app](https://github.com/GitbookIO/editor).
12+
913
## Hosting
1014

1115
This site is hosted on [Platform.sh](https://platform.sh).

SUMMARY.md

+17-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
11
# Summary
22

3-
* [First Chapter](chapter1.md)
3+
* [Introduction](README.md)
4+
* [Commerce 1.x](commerce-1/README.md)
5+
* [Commerce 2.x](commerce-2/README.md)
6+
* [Contributing](commerce-2/contributing/README.md)
7+
* [Setting up the environment](commerce-2/contributing/environment.md)
8+
* [Executing the automated tests](commerce-2/contributing/testing.md)
9+
* [Developing](commerce-2/contributing/start_developing.md)
10+
* [Installing](commerce-2/install/README.md)
11+
* [Dependencies](commerce-2/dependencies/README.md)
12+
* [Address](commerce-2/dependencies/address/README.md)
13+
* [Zones](commerce-2/dependencies/address/zones.md)
14+
* [Profile](commerce-2/dependencies/profile.md)
15+
* [Inline Entity Form](commerce-2/dependencies/ief.md)
16+
* [Currency](commerce-2/currency/README.md)
17+
* [Store](commerce-2/store/README.md)
18+
* [Product](commerce-2/product/README.md)
19+

book.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "Drupal Commerce 2.x Documentation",
3+
"version": "0.0.1",
4+
"description": "Drupal Commerce is an open source eCommerce framework that is designed to enable flexible eCommerce for websites and applications based on Drupal.",
5+
"repository": {
6+
"type": "git",
7+
"url": "https://github.com/commerceguys/commerce-docs"
8+
}
9+
}

chapter1.md

-3
This file was deleted.

commerce-2/contributing/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Contributing
2+
3+
For some time development will happen on GitHub and will be using the pull
4+
request model: In case you are not familiar with that, please take a few minutes
5+
to read the [GitHub article](https://help.github.com/articles/using-pull-requests)
6+
about that topic.
7+
8+
Please take a moment to read the [Development Guide](start_developing.md) to learn about the process and the conventions used in this project.
+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Setting up the environment
2+
3+
### LAMP
4+
5+
The very first step for starting contributing to Drupal Commerce is to setup a classic
6+
"LAMP" environment: that's a bit out of the scope of this document, so please
7+
take a look at [Drupal Installation Guide](https://drupal.org/documentation/install)
8+
and especially at its [System requirements section](https://drupal.org/requirements).
9+
10+
### Drush
11+
12+
Installing the powerful Drupal Shell is not mandatory but it can definitely be helpful during development. The recommended way to install it is through composer. Unfortunately, due to a (temporary?) dependency-clash between Drupal 8 and Drush 7, it's not possible to just install it within your Drupal 8's vendors directory.
13+
So fire the following in your terminal:
14+
15+
composer global require drush/drush=dev-master
16+
17+
### Drupal 8
18+
19+
Once you've got your system ready to host Drupal 8, the next step is to go and
20+
clone its repository in the directory where your web server will expect it to be
21+
by using the following command, being careful to replace "MINOR_VERSION" and "DESTINATION_DIRECTORY" as needed:
22+
23+
git clone --branch 8.MINOR_VERSION.x http://git.drupal.org/project/drupal.git DESTINATION_DIRECTORY
24+
25+
Please look at the [Drupal Git Instructions](https://drupal.org/project/drupal/git-instructions)
26+
for more information about how to clone Drupal.
27+
28+
Once you finished cloning Drupal, set up a database for it and proceed with the
29+
installation: after it's completed, the only thing's missing is the Drupal Commerce
30+
module.
31+
32+
### Drupal Commerce 2.x
33+
34+
#### NOTE: you will need a working GitHub account for contributing.
35+
36+
In order to start working on Drupal Commerce 2.x, you have to visit its
37+
[module page on GitHub](https://github.com/commerceguys/commerce) and click the **fork**
38+
button.
39+
40+
![Forking Drupal Commerce repository](images/original-repository.jpg)
41+
42+
That will create a copy of the Drupal Commerce repository on your GitHub account. At this
43+
point you're ready to clone it in your working environment in a directory of your choice by using the following command (don't forget to replace YOUR_USER with
44+
the name of your GitHub user):
45+
46+
git clone [email protected]:YOUR_USER/commerce.git
47+
48+
Once you did all of that, symlink the cloned commerce directory under the Drupal's ``modules``
49+
directory.
50+
51+
**NOTE: directly cloning Drupal Commerce within Drupal's ``modules`` directory is discouraged for development.**
52+
53+
![Drupal 8 modules page](images/forked-repository.jpg)
54+
55+
The only thing left to do now is to head to the module page clicking on the
56+
**Extend** button in the top menu and enable Drupal Commerce.
57+
58+
![Drupal 8 modules page](images/enable-module.jpg)
53.6 KB
Loading
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Developing
2+
3+
Once you verified everything's working properly by [running the tests](testing.md), you're ready to go!
4+
5+
6+
### Taking a look at the issue queue
7+
8+
While the coding is done on github, the issue queue is still taken care of on drupal.org: you can take a look at [the open issues](https://www.drupal.org/project/issues/search/rules?assigned=&submitted=&project_issue_followers=&status[0]=Open&version[0]=8.x&issue_tags_op=%3D&issue_tags=&text=&&&&order=field_issue_priority&sort=desc
9+
), pick one you like and **assign it to you**.
10+
11+
### Coding and Pull Request-ing
12+
13+
Remember to create a branch before start developing! It's name should contain the issue id and a slug to tell what the thing you're working on is about, for example: **2276369-readme**.
14+
15+
Once you're done with the development, push your commits and [create a Pull Request](https://help.github.com/articles/using-pull-requests#initiating-the-pull-request) on github.
16+
17+
After your code has been reviewed, you might be asked to perform some changes and then have them reviewed again. After a number of iterations, you should get your code merged into the main repository. Hurray!
18+
19+
### Keeping your fork up to date
20+
21+
After some time your forked repository and the original one(called *upstream*) will eventually get out of sync leaving you with an old, unsupported version. In order to keep that up to date, you'll need to *fetch* (i.e: downloading without touching the code on your computer) the latest commits and then *merge* them in the branch you need, which most likely will be **8.x-3.x**. So enter your Rules module's directory and type:
22+
23+
git remote add upstream [email protected]:fago/rules.git
24+
25+
26+
This command will add the original Rules' repository reference to your local repository(you don't have to repeat it all the time, just the first one will do).
27+
Then you can proceed with the download and merge on the wanted branch:
28+
29+
git fetch upstream
30+
git checkout 8.x-3.x
31+
git merge upstream/8.x-3.x
32+
33+
And that's it! Your repository is up to date again so that you can start developing a new feature right away! Please check [Github's guide on how to sync a fork](https://help.github.com/articles/syncing-a-fork) for more information
34+
35+
### Keep the conventions in mind
36+
37+
* Always create an issue in the [drupal.org Rules issue queue](http://drupal.org/project/issues/rules)
38+
for every pull request you are working on.
39+
* Always cross-reference the Issue in the Pull Request and the Pull Request in
40+
the Issue.
41+
* Always create a new branch for every pull request: its name should contain a
42+
brief summary of the ticket and its issue id, e.g **2276369-readme**.
43+
* Try to keep the history of your pull request as clean as possible by squashing
44+
your commits: you can look at the [Symfony documentation](http://symfony.com/doc/current/cmf/contributing/commits.html)
45+
or at the [Git book](http://git-scm.com/book/en/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages)
46+
for more information on how to do that.

commerce-2/contributing/testing.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Executing the automated tests
2+
3+
This module comes with PHPUnit and SimpleTest tests. You need a working Drupal 8
4+
installation and a checkout of the Rules module in the modules folder.
5+
6+
#### PHPUnit
7+
8+
./core/vendor/phpunit/phpunit/phpunit -c ./core/phpunit.xml.dist ./modules/rules
9+
10+
#### Simpletest
11+
12+
Make sure simpletest is enabled:
13+
14+
drush en -y simpletest rules
15+
16+
And then run the tests
17+
18+
drush test-run 'Rules, Rules conditions'
19+
20+
php ./core/scripts/run-tests.sh --verbose --color "rules"
21+
22+
You can also execute the test cases from the web interface at ``/admin/config/development/testing``.

cover.jpg

233 KB
Loading

0 commit comments

Comments
 (0)