Index: README.md |
diff --git a/README.md b/README.md |
index 5bff5edd72c9b3cb74c77293fd516a0f6971851e..885735fc8a7d33e58f653941ac22ac7c7448ac73 100644 |
--- a/README.md |
+++ b/README.md |
@@ -1,69 +1,118 @@ |
This is the server that will be used on `pub.dartlang.org` as the default |
package repository for the Pub package manager. |
-For license information, please see LICENSE. |
- |
-### Repository Structure |
- |
- pub_dartlang.py The entry point for running the app. |
- app.yaml App Engine configuration. |
- third_party/ External dependencies, included in the repo so that App |
- Engine will see them. |
- handlers/ Code that handles HTTP requests. |
- models/ Models for persisting data to the App Engine Datastore. |
- views/ Mustache templates. |
- |
- test.py The entry point for testing the app. |
- tests/ Code for testing the app. |
- |
-### Running the Server Locally |
+For license information, please see [LICENSE](LICENSE). |
+ |
+## Repository structure |
+ |
+ ┐ |
+ ├───┬ app/ The app engine app. |
+ │ ├───┬ doc/ Source markdown for documentation. |
+ │ │ └─... |
+ │ ├───┬ handlers/ Core web server code. |
+ │ │ └─... |
+ │ ├───┬ models/ Models for persisting data to the datastore. |
+ │ │ └─... |
+ │ ├───┬ static/ Static assets. |
+ │ │ ├───┬ img/ |
+ │ │ │ └─... |
+ │ │ ├───┬ js/ |
+ │ │ │ └─... |
+ │ │ ├──── favicon.ico |
+ │ │ └──── style.css Generated stylesheet. Modify /stylesheets/style.scss instead. |
+ │ │ |
+ │ ├───┬ views/ Mustache templates. |
+ │ │ ├───┬ doc/ Generated HTML. Modify /app/doc/ files instead. |
+ │ │ │ └─... |
+ │ │ └─... |
+ │ ├──── app.yaml AppEngine configuration. |
+ │ ├──── appengine_config.py Python module configuration. |
+ │ ├──── pub_dartlang.py Entrypoint for app. Use dev_appserver.py to run. |
+ │ └─... |
+ │ |
+ ├───┬ stylesheets/ |
+ │ └───┬ partials/ |
+ │ ├──── _syntax.scss Syntax highlighting styles. |
+ │ ├──── _variables.scss Variables for theming bootstrap. |
+ │ └ style.scss Main stylesheet. |
+ │ |
+ ├───┬ test/ Tests for app functionality. |
+ │ └──── ... |
+ │ |
+ ├───┬ third_party/ External dependencies used by the app. |
+ │ └──── ... |
+ │ |
+ ├──── _config.yml Jekyll configuration. |
+ ├──── Procfile Process to be run with Foreman. |
+ ├──── test.py Runs all tests. |
+ ├──── config.rb Compass configuration. |
+ └──── ... |
+ |
+## Running the server locally |
+ |
+**tl;dr:** Run the app with ```dev_appserver.py app```. |
+ |
+### Prerequisites |
The server is written in Python and intended to run on Google App Engine. To run |
it locally, perform the following steps: |
- * Install the [App Engine SDK][] for Python. |
- * Make sure the SDK is on your `$PATH`.<sup>1</sup> |
- * Install required packages.<sup>2</sup> |
+ 1. Install the [App Engine SDK][] for Python. |
+ 1. Make sure the SDK is on your `$PATH`.<sup>1</sup> |
+ 1. Install required packages.<sup>2</sup> |
pip install beautifulsoup4 pycrypto webtest |
+[app engine sdk]: https://developers.google.com/appengine/downloads |
+ |
+### Running the server |
+ |
* From the root directory of this repository, run: |
dev_appserver.py app |
-[app engine sdk]: https://developers.google.com/appengine/downloads |
- |
* Open your browser to <http://localhost:8080/> to see that it works. |
- * To run tests: |
+### Running tests |
+ |
+ * To run tests, run: |
./test.py |
- * To publish packages to your local test server, visit <http://localhost:8080/admin> |
- (sign in as administrator), go to the "Private Key" tab & enter any string |
+### Publishing packages locally |
+ |
+ * To publish packages to your local test server, visit |
+ <http://localhost:8080/admin> |
+ (sign in as administrator), go to the "Private Key" tab & enter any string |
into the private key field. |
<sup>1</sup> This might have been done already if you allowed the Google App |
Engine launcher to add symbolic links to your `$PATH`. |
<sup>2</sup> On installing packages: |
+ |
* Beautiful Soup & WebTest are only required for running tests. |
* Some Linux distributions come with PyCrypto installed by default. Make sure |
at least version 2.6 installed. |
* If using Mac and `pip` is not available, install [brew](http://brew.sh) and |
run `brew install python`. |
-### Deploying |
+## Deploying to production |
See the docs on [branches and versions][]. |
-[branches and versions]: https://github.com/dart-lang/pub-dartlang/wiki/Branches-and-Versions |
+[branches and versions]: |
+https://github.com/dart-lang/pub-dartlang/wiki/Branches-and-Versions |
+ |
+## Modifying the CSS and documentation |
+ |
+* The [CSS files](app/static/style.css) are generated from the source |
+[Sass][] files using [Compass][]. |
-### Modifying the CSS and Documentation |
+* The [HTML documentation files](app/views/doc/) are generated from the source |
+[Markdown][] using [Jekyll][]. |
-The CSS files are generated from the source [Sass][] files using [Compass][]. |
-The HTML documentation files are generated from the source [Markdown][] using |
-[Jekyll][]. To get ready to make changes, you'll need [Ruby][] and [Python][]. |
+To get ready to make changes, you'll need [Ruby][] and [Python][]. |
Then: |
[ruby]: http://ruby-lang.org |
@@ -85,7 +134,7 @@ Then: |
sudo pip install --upgrade pygments |
-Note that this is only needed on your development machine to iterate on the CSS |
+This is only needed on your development machine to iterate on the CSS |
and documentation. The deployed server just uses the pre-compiled CSS and HTML |
and only requires Python. |
@@ -101,5 +150,5 @@ Once you have everything installed, to modify the styles and documentation: |
[foreman]: http://ddollar.github.com/foreman/ |
-When you make changes to SCSS or Markdown files, make sure to check in the |
-generated CSS or HTML files with them. |
+**When you make changes to SCSS or Markdown files, make sure to check in the |
+generated CSS or HTML files with them.** |