Coder Social home page Coder Social logo

anticensorship-mirror-python's Introduction

fightforthefuture.org

CircleCI

Campaigners

All your documentation has been moved to the wiki.

Developers:

https://www.fightforthefuture.org/ is hosted on Amazon S3 and CloudFlare.

Housekeeping

Dependencies:

  • See .ruby-version for expected Ruby
  • Node and npm versions are declared in package.json

Here’s a thing—this is not a willy-nilly slapdash combination of underscores, dashes, and camelCase. There is a method to its madness. Underscores are used in Ruby variables. All over the place in yml and Liquid. Dashes are used in Less/CSS. Because that is how it is done. And camelCase is BFFs with Javascript. They are meant for each other.

Frameworks and libraries

Installing & running the server

  • Copy the .env.sample file and name the new file .env.
  • Copy the _config_petition_ids.yml.sample file and name the new file _config_petition_ids.yml.
  • If don't have ruby installed, follow these instructions to setup your environment with rbenv, and then run gem install bundler.
  • Run bundle install
  • npm install. First this makes sure bundle is installed, then it installs npm packages & ruby gems.
  • npm start to run grunt (compiles assets, then watches for changes and compiles those too.)

Deploying

Production: Amazon S3

fightforthefuture.org is hosted on Amazon S3. Here’s how it works: every time a commit is pushed to the production branch, Circle CI runs a build and deploys that to an S3 bucket.

Local Deploys
  1. Ensure that you have the AWS CLI installed
  2. Create a named profile in ~/.aws/credentials called fftf-s3-deploy with valid credentials.
  3. npm run deploy
Blog

The blog content is pulled from Tumblr using scripts/sync_tumblr.js and an AWS Lambda function triggers a Circle CI build whenever a new Tumblr post is detected.

Code Structure

CSS/Less

  • All Less files compiled and minified to public/css/core.css
  • When in doubt, make a new Less file and import it in core.less—there’s no real performance hit as a result of good organization
  • Don’t worry about browser prefixes. Grunt handles that too.
  • Follow the 18F Front end style guide

Javascript

This is all aspirational, a boilerplate being applied to a legacy codebase
  • js/main.js will generally be used to contain the main page logic.
  • js/controllers will contain all Composer controllers
  • js/models is there for Composer models and collections
  • js/views not just for Composer views, but for individual page logic on pages that have absolutely zero relationship with Composer. Also, regarding Composer views: use raw markup where you can, for speed.
  • This all compiles down to public/js/core.js via grunt, which also uglifies it - If you’re adding a javascript file that ought to be included in core.js, make sure to add its path to the files array inside the concat task in Gruntfile.js

anticensorship-mirror-python's People

Contributors

rubbingalcoholic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.