Giter Site home page Giter Site logo

alexxnica / network Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mozillafoundation/foundation.mozilla.org

0.0 1.0 0.0 5.44 MB

Mozilla Network

Home Page: https://network.mofostaging.net

License: Mozilla Public License 2.0

JavaScript 36.62% CSS 19.13% HTML 44.24%

network's Introduction

Mozilla Network

Build Status Uses Mofo Standards

Development

Setup

Requirements: Node, npm, git.

Run the following terminal commands to get started:

  • git clone https://github.com/mozilla/network.git
  • cd network
  • npm start

This will install all dependencies, build the code, start a server at http://127.0.0.1:2017, and launch it in your default browser.

Stack

HTML

HTML is generated from Pug templates (formerly known as Jade).

Localized strings are pulled from Java .properties files located in /locales.

CSS

CSS is generated from Sass. The Mofo Bootstrap theme is pulled in by default.

React

React is used à la carte for isolated component instances (eg: a tab switcher) since this is not a single page application, but rather a static generated website. This precludes the need for Flux architecture, or such libraries as React Router.

To add a React component, you can target a container element from /source/js/main.js and inject it.

File Structure

/
├── env <- Environment variables
├── dest <- Compiled code generated from source. Don't edit!
├── locales <- Localized strings (Java .properties syntax)
├── scripts <- Scripts run by npm tasks
└── source <- Source code
    ├── images <- Image assets
    ├── js <- JS code
    │   └── components <- React components
    ├── json <- JSON for static data sets
    │   └── temp <- JSON pulled from web services. Don't commit!
    ├── pug <- Pug templates
    └── sass <- Sass code

Deployment

Staging

Builds to staging are triggered by commits to master. A Jenkins job deploys to the "network-staging" S3 bucket in us-east-1, which is served using a CloudFront CDN.

Staging URL is network.mofostaging.net

gh-pages "personal" staged builds

A build can be deployed to GitHub Pages on any fork by running:

npm run stage REMOTE (Change REMOTE to match your desired target)

This is typically useful for creating staged builds of unmerged features for design review.

Production

Production deployments are triggered manually via a Jenkins job. Deployments are made to "network-production" in us-east-1, served using a CloudFront CDN.

Temporary production URL is network.mofoprod.net

network's People

Contributors

gvn avatar alanmoo avatar simonwex avatar

Watchers

 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.