Chromium Code Reviews| Index: README.md |
| diff --git a/README.md b/README.md |
| index 5bff5edd72c9b3cb74c77293fd516a0f6971851e..7b92c90e75ad35afccf28a3a1d2372b8b0aa5021 100644 |
| --- a/README.md |
| +++ b/README.md |
| @@ -1,44 +1,85 @@ |
| 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/ Documentation and articles. |
|
Bob Nystrom
2013/11/26 19:00:11
"Source markdown for documentation"
Andrei Mouravski
2013/11/29 21:21:21
Done.
|
| + │ │ └─... |
| + │ ├───┬ 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. |
|
Bob Nystrom
2013/11/26 19:00:11
Long line, here and below.
nweiz
2013/11/27 00:58:59
I think long lines in code blocks are reasonable i
Andrei Mouravski
2013/11/29 21:21:21
Ack.
Andrei Mouravski
2013/11/29 21:21:21
Ack.
|
| + │ │ |
| + │ ├───┬ views/ Mustache templates. |
| + │ │ ├───┬ doc/ Generated HTML. Modify /app/doc/ files instead. |
|
Bob Nystrom
2013/11/26 19:00:11
Ditto.
Andrei Mouravski
2013/11/29 21:21:21
Ack.
|
| + │ │ │ └─... |
| + │ │ └─... |
| + │ ├──── 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 Dart language syntax styles. |
|
Bob Nystrom
2013/11/26 19:00:11
Technically, this applies to other languages too,
Andrei Mouravski
2013/11/29 21:21:21
Done.
|
| + │ ├──── _variables.scss Variables for theming. |
| + │ └ style.scss Main stylesheet. |
| + │ |
| + ├───┬ test/ Tests for app functionality. |
| + │ └──── ... |
| + │ |
| + ├───┬ third_party/ External dependencies to be include in the app. |
|
Bob Nystrom
2013/11/26 19:00:11
"to be include in" -> "used by"
Andrei Mouravski
2013/11/29 21:21:21
Done.
|
| + │ └──── ... |
| + │ |
| + ├──── _config.yml Jekyll configuration. |
| + ├──── Procfile Process to be run with Foreman. |
| + ├──── test.py Tests the app. |
|
Bob Nystrom
2013/11/26 19:00:11
"Runs all tests."
Andrei Mouravski
2013/11/29 21:21:21
Done.
|
| + ├──── config.rb Compass configuration. |
| + └──── ... |
| + |
| +## Running the server locally |
| + |
| +**tl;dr:** Run the app with ```dev_appserver.py app```. |
| + |
| +### Prerequisites |
|
nweiz
2013/11/27 00:58:59
Nit: newline after this.
Andrei Mouravski
2013/11/29 21:21:21
Done.
|
| 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. |
| + 1. Install the [App Engine SDK][] for Python. |
| * Make sure the SDK is on your `$PATH`.<sup>1</sup> |
| * Install required packages.<sup>2</sup> |
|
Bob Nystrom
2013/11/26 19:00:11
Convert the other bullets to numeric too.
Andrei Mouravski
2013/11/29 21:21:21
Done.
|
| pip install beautifulsoup4 pycrypto webtest |
| +[app engine sdk]: https://developers.google.com/appengine/downloads |
| + |
| +### Running server |
|
nweiz
2013/11/27 00:58:59
Nit: "Running the server"
Andrei Mouravski
2013/11/29 21:21:21
Done.
|
| + |
| * 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 |
| +### 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. |
| @@ -47,23 +88,27 @@ it locally, perform the following steps: |
| 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 the web |
|
Bob Nystrom
2013/11/26 19:00:11
"the web" -> "production"
Andrei Mouravski
2013/11/29 21:21:21
Done.
|
| See the docs on [branches and versions][]. |
| [branches and versions]: https://github.com/dart-lang/pub-dartlang/wiki/Branches-and-Versions |
| -### Modifying the CSS and Documentation |
| +## Modifying the CSS and documentation |
| + |
| +* The [CSS files](app/static/style.css) are generated from the source [Sass][] files using [Compass][]. |
| + |
| +* The [HTML documentation files](app/views/doc/) are generated from the source [Markdown][] using |
| +[Jekyll][]. |
|
Bob Nystrom
2013/11/26 19:00:11
Long lines.
Andrei Mouravski
2013/11/29 21:21:21
Done.
|
| -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 +130,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 +146,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.** |