Giter Club home page Giter Club logo

pub-dartlang's Introduction

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

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.

  • Make sure the SDK is on your $PATH.

  • Install PyCrypto1:

    pip install pycrypto
    
  • From the root directory of this repository, run:

    dev_appserver.py .
    

That's it. All the dependencies needed to run the app are included in the repository so that App Engine can use them, so no further installation is necessary.

Running Tests

The tests have some external dependencies. Before you can run the tests, perform the following steps once:

  • Install the App Engine SDK.

  • Make sure the SDK is on your $PATH.

  • Run:

    easy_install webtest
    easy_install beautifulsoup4
    

Once everything is installed, you can run the tests by running:

./test.py

Modifying the CSS and Documentation

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. Then:

  1. Ensure you have bundler installed:

    gem install bundler
    
  2. Run this to install the dependencies:

    bundle install
    
  3. Run this to install the latest version of Pygments for syntax highlighting:

    sudo pip install --upgrade pygments
    

Note that 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.

Once you have everything installed, to modify the styles and documentation:

  1. Run Foreman to automatically regenerate the CSS and HTML files when any Sass or Markdown files change:

    bundle exec foreman start
    
  2. Edit the .scss files under css/sass and the .markdown files under doc.

When you make changes to SCSS or Markdown files, make sure to check in the generated CSS or HTML files with them.

Footnotes

  1. Some Linux distributions come with PyCrypto installed by default. Make sure you have at least version 2.6 installed. โ†ฉ

pub-dartlang's People

Contributors

amouravski avatar butlermatt avatar deepsourcebot avatar munificent avatar nex3 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.