diff --git a/bin/build.sh b/bin/build.sh deleted file mode 100755 index 5add42679..000000000 --- a/bin/build.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -cd "$(dirname ${BASH_SOURCE[0]})"/.. -mkdir -p .npm .config - -docker run --rm --label=node \ - -u $(id -u) \ - -v $(pwd)/.config:/.config \ - -v $(pwd)/.npm:/.npm \ - -v $(pwd):/app -w /app\ - node:16-alpine \ - npm run-script build-docs diff --git a/bin/slack-notify.sh b/bin/slack-notify.sh deleted file mode 100755 index 0d8c31272..000000000 --- a/bin/slack-notify.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/bash -set -eo pipefail - -# Required environment variables if using --stage: -# BRANCH_NAME, BUILD_NUMBER - -# defaults and constants -CHANNEL="www-notify" -PROJECT_NAME="protocol" -BLUE_BUILD_URL="https://ci.us-west.moz.works/blue/organizations/jenkins/protocol" -BLUE_BUILD_URL="${BLUE_BUILD_URL}/detail/${BRANCH_NAME/\//%2f}/${BUILD_NUMBER}/pipeline" - -# parse cli args -while [[ $# -gt 1 ]]; do - key="$1" - case $key in - --stage) - STAGE="$2" - shift # past argument - ;; - --status) - STATUS="$2" - shift # past argument - ;; - -m|--message) - MESSAGE="$2" - shift # past argument - ;; - esac - shift # past argument or value -done - -if [[ -n "$STATUS" ]]; then - STATUS=$(echo "$STATUS" | tr '[:lower:]' '[:upper:]') - case "$STATUS" in - 'SUCCESS') - STATUS_PREFIX=":tada:" - ;; - 'SHIPPED') - STATUS_PREFIX=":ship:" - ;; - 'WARNING') - STATUS_PREFIX=":warning:" - ;; - 'FAILURE') - STATUS_PREFIX=":rotating_light:" - ;; - *) - STATUS_PREFIX=":sparkles:" - ;; - esac - STATUS="${STATUS_PREFIX} *${STATUS}*: " -fi - -# add project name -STATUS="*${PROJECT_NAME}*: ${STATUS}" - -if [[ -n "$STAGE" ]]; then - MESSAGE="${STATUS}${STAGE}:" - MESSAGE="$MESSAGE Branch *${BRANCH_NAME}* <${BLUE_BUILD_URL}|build #${BUILD_NUMBER}>" -elif [[ -n "$MESSAGE" ]]; then - MESSAGE="${STATUS}${MESSAGE}" -else - echo "Missing required arguments" - echo - echo "Usage: slack-notify.sh [--stage STAGE]|[-m MESSAGE]" - echo "Optional args: --status" - exit 1 -fi - -slack-cli -d "${CHANNEL}" "${MESSAGE}" || true diff --git a/docs/03-contributing/01-overview.md b/docs/03-contributing/01-overview.md index 10c7b81c3..815ea0ad2 100644 --- a/docs/03-contributing/01-overview.md +++ b/docs/03-contributing/01-overview.md @@ -3,7 +3,7 @@ title: Contributing to Protocol label: Overview --- -Protocol, like everything else Mozilla makes, is [open source](https://developer.mozilla.org/docs/Mozilla/Developer_guide/Introduction). +Protocol, like everything else Mozilla makes, is [open source](https://wiki.mozilla.org/Contribute). We welcome contributions from people like you. Yes, you, dear reader, can help us make Protocol better and more useful, no matter your skill level or area of interest. @@ -125,7 +125,6 @@ reach the really good stuff but the top-level root folder looks something like: ```text protocol ├── assets (Sass, JavaScript, and font files; this is what gets published with the package) -├── bin (scripts that deploy the site to the server) ├── components (the HTML components) ├── docs (documentation pages [including this one]) ├── static (media assets for display on the Protocol website, but not part of Protocol itself) @@ -146,10 +145,10 @@ CSS and JavaScript is in `assets` (we’ll do a deeper dive into that folder sho ## Component patterns The Protocol documentation uses [Fractal](https://fractal.build) and component -templates are build with with [Nunjucks](https://mozilla.github.io/nunjucks/), a +templates are built with [Nunjucks](https://mozilla.github.io/nunjucks/), a templating language that is mostly plain HTML with some added enhancements. Each component resides in its own Nunjucks template file (using the extension `.html`) -along with a `readme.md` file (written in [Markown](https://daringfireball.net/projects/markdown/) +along with a `readme.md` file (written in [Markdown](https://daringfireball.net/projects/markdown/) format) with notes and documentation for that component. Many have an accompanying configuration file written in [YAML](https://yaml.org/) providing [contextual data](https://fractal.build/guide/core-concepts/context-data.html) @@ -217,10 +216,9 @@ sass/protocol │ ├── fonts │ ├── forms │ ├── mixins +│ ├── themes │ ├── _functions.scss -| ├── _lib.scss -| ├── _mixins.scss -│ └── _themes.scss +│ └── _lib.scss ├── templates ├── protocol-components.scss └── protocol.scss @@ -284,7 +282,7 @@ but if you’re not let’s dig a bit deeper. @import '../includes/lib'; ``` -First, we import the Protocol library file with the decorator `@use`: `includes/_lib.scss`. +First, we import the Protocol library file with `@use` directive: `includes/_lib.scss`. To learn more about `@use` and `@forward` read [this article](https://www.oddbird.net/2019/10/02/sass-modules/). Since that file is a Sass partial we don’t need the underscore prefix or the file extension, just referencing the relative path and filename is enough. That library file in turn