This repository has been archived by the owner on May 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from ClickTrap-Media/develop
First release of gatsby-plugin-klaro
- Loading branch information
Showing
33 changed files
with
12,413 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"presets": [ | ||
["babel-preset-gatsby-package", { "browser": true }] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
module.exports = { | ||
parser: "babel-eslint", | ||
extends: [ | ||
"google", | ||
"eslint:recommended", | ||
"plugin:flowtype/recommended", | ||
"plugin:react/recommended", | ||
"prettier", | ||
"prettier/flowtype", | ||
"prettier/react", | ||
], | ||
plugins: ["flowtype", "prettier", "react", "filenames"], | ||
parserOptions: { | ||
ecmaVersion: 2016, | ||
sourceType: "module", | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
}, | ||
env: { | ||
browser: true, | ||
es6: true, | ||
node: true, | ||
jest: true, | ||
}, | ||
globals: { | ||
before: true, | ||
after: true, | ||
spyOn: true, | ||
__PATH_PREFIX__: true, | ||
__BASE_PATH__: true, | ||
__ASSET_PREFIX__: true, | ||
}, | ||
rules: { | ||
"arrow-body-style": [ | ||
"error", | ||
"as-needed", | ||
{ requireReturnForObjectLiteral: true }, | ||
], | ||
"no-unused-expressions": [ | ||
"error", | ||
{ | ||
allowTaggedTemplates: true, | ||
}, | ||
], | ||
"no-unused-vars": [ | ||
"warn", | ||
{ | ||
varsIgnorePattern: "^_" | ||
} | ||
], | ||
"consistent-return": ["error"], | ||
"filenames/match-regex": ["error", "^[a-z-\\d\\.]+$", true], | ||
"no-console": "off", | ||
"no-inner-declarations": "off", | ||
"prettier/prettier": "error", | ||
quotes: ["error", "double"], | ||
"react/display-name": "off", | ||
"react/jsx-key": "warn", | ||
"react/no-unescaped-entities": "off", | ||
"react/prop-types": "off", | ||
"require-jsdoc": "off", | ||
"valid-jsdoc": "off", | ||
}, | ||
settings: { | ||
react: { | ||
version: "16.4.2", | ||
}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @ClickTrap-Media/oss-maintainer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: 'C2 - bug' | ||
assignees: pascal-zarrad | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Execute command "..." | ||
2. Type "..." | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Environment:** | ||
- OS: [e.g. Linux] | ||
- Dist: [e.g. Ubuntu] | ||
- Shell: [e.g. Bash] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. | ||
|
||
**Don't forget to add labels!** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: 'C1 - enhancement' | ||
assignees: pascal-zarrad | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
### Description | ||
What does your PR solve? If new features where added by your PR, what are the features? | ||
|
||
### Issue relations | ||
To which issue(s) is your PR related? Use keywords (for example "Closes #1") to link your issues properly. | ||
|
||
### Test Scenarios | ||
Describe how reviewers can verify that your changes do work from a functional perspective. | ||
|
||
### Additional information | ||
Add here additional information if applicable or remove this section. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Run build on every push & pr to run qa checks | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [14.15.4] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
- name: Run tests | ||
run: npm run buildCoverage | ||
|
||
- name: Remove node_modules | ||
run: | | ||
rm -rf node_modules | ||
- name: Upload build artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: output | ||
path: ./ | ||
- name: Upload coverage report | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: code-coverage-report | ||
path: coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# Deploy a release to npmjs.com when a push to main occurs | ||
name: Deploy Release | ||
|
||
# Run job on push to main | ||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [14.15.4] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
- name: Run tests | ||
run: npm run buildCoverage | ||
|
||
- name: Publish on npmjs.com | ||
uses: JS-DevTools/npm-publish@v1 | ||
with: | ||
token: ${{ secrets.NPM_PUBLISH_TOKEN }} | ||
|
||
- name: Prepare version for tag | ||
run: node -p -e '`PACKAGE_VERSION=${require("./package.json").version}`' >> $GITHUB_ENV | ||
|
||
- name: Push git tag to | ||
uses: pkgdeps/git-tag-action@v2 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
github_repo: ${{ github.repository }} | ||
version: ${{ env.PACKAGE_VERSION }} | ||
git_commit_sha: ${{ github.sha }} | ||
git_tag_prefix: "v" | ||
|
||
- name: Changelog | ||
uses: scottbrenner/generate-changelog-action@master | ||
id: Changelog | ||
env: | ||
REPO: ${{ github.repository }} | ||
|
||
- name: Create release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: v${{ env.PACKAGE_VERSION }} | ||
release_name: Release v${{ env.PACKAGE_VERSION }} | ||
body: | | ||
${{ steps.Changelog.outputs.changelog }} | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Remove node_modules | ||
run: rm -rf node_modules | ||
|
||
- name: Remove coverage | ||
run: rm -rf coverage | ||
|
||
- name: Upload build artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: output | ||
path: ./ | ||
- name: Upload coverage report | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: code-coverage-report | ||
path: coverage | ||
|
||
- name: Package artifact | ||
run: zip -r gatsby-plugin-klaro-v${{ env.PACKAGE_VERSION }}.zip . | ||
|
||
- name: Upload artifact | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./gatsby-plugin-klaro-v${{ env.PACKAGE_VERSION }}.zip | ||
asset_name: gatsby-plugin-klaro-v${{ env.PACKAGE_VERSION }}.zip | ||
asset_content_type: application/zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Checks for Git branches and commit messages to keep consistency on the repo | ||
name: Git | ||
|
||
on: ['pull_request'] | ||
|
||
jobs: | ||
# Verify that the branch name matches the format expected for contributions | ||
verify_branch_name: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check branch name | ||
uses: deepakputhraya/action-branch-name@master | ||
with: | ||
regex: '([a-z])+\/([a-z])+' | ||
allowed_prefixes: 'feature,bug,release' | ||
ignore: master,develop | ||
verify_commit_messages: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: wagoid/commitlint-github-action@v2 | ||
with: | ||
configFile: commitlint.config.js | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Mark and close stale issues to keep issues clean | ||
name: Close stale issues and pull requests | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
stale: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
stale-issue-message: 'This issue did not have any activity in the last 60 days. It has been marked as stale and will be closed soon.' | ||
stale-pr-message: 'This pull request did not have any activity in the last 60 days. It has been marked as stale and will be closed soon.' | ||
stale-issue-label: 'S2 - stale - no activity' | ||
stale-pr-label: 'S2 - stale - no activity' | ||
exempt-issue-labels: 'S6 - in progress' | ||
exempt-pr-labels: 'S6 - in progress' | ||
days-before-stale: 60 | ||
days-before-close: 7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.github | ||
.editorconfig | ||
CODE_OF_CONDUCT.md | ||
commitlint.config.js | ||
CONTRIBUTING.md | ||
SECURITY.md | ||
tasks | ||
gulpfile.js | ||
.babelrc | ||
src | ||
jest.config.js | ||
coverage/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = { | ||
arrowParens: "avoid", | ||
semi: true, | ||
} |
Oops, something went wrong.