Mozilla Webdev Tools and Pages
This repo serves several purposes:
- Contains code for building and deploying the gh-pages branch behind https://mozilla.github.io/webdev/.
- Contains small tools that are useful for the Mozilla Webdev group.
These steps assume you have Node.js installed.
Clone this repo:
$ git clone https://github.com/mozilla/webdev.git
$ npm install -g gulp $ npm install
(Optional) Add your Github credentials to a
.envfile in the repo's root. These are used by the
buildcommand when downloading metadata from Github. For security, you should probably use a Personal Access Token for the password and limit it to
public_repopermissions only. For example:
projects.json contains a categorized list of projects the Webdev group is
responsible for. It's intended to be manually kept up-to-date and is useful for
running scripts across all Webdev projects.
Available Gulp Commands
Run a development server for the Github pages site on port 8000. Auto-builds the
site when anything is changed in the
Builds the site in the
build directory. Runs all the HTML files through
Nunjucks with the following context:
projects: Object containing the parsed contents of
The metadata added to the projects list is downloaded from the Github API and
is cached for 24 hours. The
--force flag will force a re-download of this
Note that it's very easy to hit API limits if you haven't added your credentials to a .env file.
Build the site and commit the changes to the
gh-pages branch, pushing them to
Fetch contribute.json files for all of the projects in
validate them. Currently only supports repos hosted on Github.
Licensed under the Apache 2.0 License. For details, see the