Skip to content

Commit

Permalink
Merge pull request #131 from xwp/develop
Browse files Browse the repository at this point in the history
Release 1.0.0-beta
  • Loading branch information
derekherman authored Jun 3, 2021
2 parents 9b2a730 + 9ae428a commit 1f12b7d
Show file tree
Hide file tree
Showing 82 changed files with 14,841 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"presets": ["@babel/env"],
"plugins": []
}
9 changes: 9 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
last 2 Chrome versions
last 2 Android versions
last 2 ChromeAndroid versions
last 2 Firefox versions
last 2 FirefoxAndroid versions
last 2 iOS versions
last 2 Opera versions
last 2 Safari versions
last 2 Samsung versions
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
37 changes: 37 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"parser": "@babel/eslint-parser",
"parserOptions": {
"babelOptions": {
"configFile": "./.babelrc"
},
"ecmaVersion": 2018
},
"plugins": ["@babel"],
"extends": [
"airbnb-base",
"plugin:jest/recommended",
"plugin:jsdoc/recommended",
"plugin:compat/recommended"
],
"env": {
"browser": true,
"es6": true,
"es2017": true
},
"rules": {
"no-underscore-dangle": "off",
"no-param-reassign": "off",
"max-classes-per-file": "off",
"prefer-promise-reject-errors": "off",
"class-methods-use-this": "off",
"jsdoc/no-undefined-types": "off",
"no-restricted-syntax": "off",
"import/no-extraneous-dependencies": [
"error", {
"devDependencies": [
"src/js/utils/generateApi.js"
]
}
]
}
}
61 changes: 61 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
name: 🐛 Bug report
about: Create a report to help us improve
labels: bug

---

## Bug Description

<!-- Please describe clearly and concisely what the bug is. -->

## Expected Behaviour

<!-- Please describe clearly and concisely what the expected behaviour should be. -->

## Steps to reproduce

<!-- Please provide detailed steps on how to reproduce the bug. Provide a URL where the issue can be seen on the frontend when possible. -->
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

## Screenshots

<!-- If applicable, please add screenshots to help explain your problem. Bonus points for videos! -->

## Additional context

<!-- Please complete the following information. -->
- Project version:
- Node version:
- OS:
- Browser: [e.g. chrome, safari]
- Device: [e.g. iPhone12]

<!-- Please add any additional information about the bug. -->

---------------

_Do not alter or remove anything below. The following sections will be managed by moderators only._

## Acceptance criteria

* <!-- One or more bullet points for acceptance criteria. -->

## Implementation brief

* <!-- One or more bullet points for how to technically resolve the issue. For significant Implementation Design, it is ok use a Google document **accessible by anyone**. -->

## QA testing instructions

* <!-- One or more bullet points to describe how to test the implementation in QA. -->

## Demo

* <!-- A video or screenshots demoing the implementation. -->

## Changelog entry

* <!-- One sentence summarizing the PR, to be used in the changelog. -->
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: true
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: ✨ Feature request
about: Suggest an idea for this project
labels: enhancement

---

## Feature description

<!-- Please describe clear and concisely which problem the feature would solves. -->

---------------

_Do not alter or remove anything below. The following sections will be managed by moderators only._

## Acceptance criteria

* <!-- One or more bullet points for acceptance criteria. -->

## Implementation brief

* <!-- One or more bullet points for how to technically resolve the issue. For significant Implementation Design, it is ok use a Google document **accessible by anyone**. -->

## QA testing instructions

* <!-- One or more bullet points to describe how to test the implementation in QA. -->

## Demo

* <!-- A video or screenshots demoing the implementation. -->

## Changelog entry

* <!-- One sentence summarizing the PR, to be used in the changelog. -->
4 changes: 4 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## Summary

<!-- Please reference the issue(s) this PR fixes. -->
Fixes #
148 changes: 148 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
name: CI/CD Pipeline

on:
push:
branches:
- '**'
- '!main'
- '![0-9]+.[0-9]+'
pull_request:
types: [ closed ]
branches:
- 'main'
- '[0-9]+.[0-9]+'

jobs:

lint-js:
name: Lint JS
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Get npm cache directory
id: npm-cache
run: echo "::set-output name=dir::$(npm config get cache)"

- name: Configure npm cache
uses: actions/cache@v2
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Install Node dependencies
run: npm ci

- name: Detect coding standard violations
run: npm run lint

release-tag:
needs: [lint-js]
if: ${{ github.event.pull_request.merged == true }}
name: Release Tag
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set the tag version
id: package-version
uses: martinbeentjes/npm-get-version-action@master

- name: Prepare Release
id: prepare-release
continue-on-error: true
uses: derekherman/[email protected]
with:
baseRef: ${{ github.base_ref }}
headRef: ${{ github.head_ref }}
tagRef: ${{ steps.package-version.outputs.current-version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Release
uses: actions/create-release@v1
if: steps.prepare-release.outcome == 'success' && steps.prepare-release.conclusion == 'success'
with:
tag_name: ${{ steps.package-version.outputs.current-version }}
release_name: ${{ steps.package-version.outputs.current-version }}
body: |
${{ steps.prepare-release.outputs.changelog }}
${{ steps.prepare-release.outputs.props }}
prerelease: ${{ contains(github.ref, '-rc') || contains(github.ref, '-b') || contains(github.ref, '-a') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

deploy-staging:
if: github.ref == 'refs/heads/develop'
needs: [lint-js]
name: Deploy Staging
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Get npm cache directory
id: npm-cache
run: echo "::set-output name=dir::$(npm config get cache)"

- name: Configure npm cache
uses: actions/cache@v2
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Install Node dependencies
run: npm ci

- name: Build Assets
run: npm run build

- name: Deploy to Firebase
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT }}"
expires: 30d
projectId: "${{ secrets.FIREBASE_PROJECT_ID }}"
channelId: staging

deploy-production:
if: github.ref == 'refs/heads/main'
needs: [lint-js]
name: Deploy Production
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Get npm cache directory
id: npm-cache
run: echo "::set-output name=dir::$(npm config get cache)"

- name: Configure npm cache
uses: actions/cache@v2
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Install Node dependencies
run: npm ci

- name: Build Assets
run: npm run build

- name: Deploy to Firebase
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT }}"
projectId: "${{ secrets.FIREBASE_PROJECT_ID }}"
channelId: live
20 changes: 18 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
.DS_Store
.idea
# Tooling
node_modules/
vendor/

# Firebase
.firebaserc
firebase-debug.log
/.firebase

# Dist files
/public/api.json
/public/sw.js
/public/dist

# Local video sources
/public/video

# Other
.DS_Store
.idea
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run lint
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v14.15.5
Loading

0 comments on commit 1f12b7d

Please sign in to comment.