Skip to content

Commit

Permalink
release 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gregrickaby committed Jan 14, 2023
1 parent 551ba98 commit 2c046af
Show file tree
Hide file tree
Showing 33 changed files with 20,830 additions and 106 deletions.
21 changes: 21 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org

# WordPress Coding Standards
# https://make.wordpress.org/core/handbook/coding-standards/

root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab

[*.yml]
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false
19 changes: 19 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
extends: [ 'plugin:@wordpress/eslint-plugin/recommended' ],
parserOptions: {
ecmaVersion: 2021,
requireConfigFile: false,
babelOptions: {
presets: [ require.resolve( '@wordpress/babel-preset-default' ) ],
},
},
root: true,
env: {
browser: true,
es6: true,
jquery: true,
},
rules: {
'@wordpress/no-global-event-listener': 0, // Disable. We don't use React-based components.
},
};
86 changes: 0 additions & 86 deletions .github/CONTRIBUTING.md

This file was deleted.

15 changes: 0 additions & 15 deletions .github/LICENSE.md

This file was deleted.

10 changes: 5 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2
updates:
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'weekly'
day: 'monday'
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
53 changes: 53 additions & 0 deletions .github/workflows/assertions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Assertions

on:
pull_request:
branches: [main, develop]

workflow_dispatch:

jobs:
lint:
runs-on: ubuntu-latest

strategy:
matrix:
php-versions: ["8.1"]

steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "lts/*"
cache: "npm"

- name: Setup PHP ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: phpcs, composer:v2

- name: Setup Composer
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache Composer Dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install Theme Dependencies
run: |
npm i --ignore-scripts
composer install
- name: Lint Theme
run: npm run lint

- name: Build Theme
run: npm run build
25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# os
*~
.DS_*
.svn/
.cvs/
.hg/
*.bak
*.swp
Thumbs.db

# node
.env
.env.local
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
node_modules/

# composer
vendor/

# theme
build/
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/*
57 changes: 57 additions & 0 deletions .phpcs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards">
<description>Apply WordPress Coding Standards</description>

<!-- Set the memory limit to 256M.
For most standard PHP configurations, this means the memory limit will temporarily be raised.
Ref: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#specifying-phpini-settings
-->
<ini name="memory_limit" value="256M"/>

<!-- Whenever possible, cache the scan results and re-use those for unchanged files on the next scan. -->
<arg name="cache"/>

<!-- Strip the filepaths down to the relevant bit. -->
<arg name="basepath" value="./"/>

<!-- Check up to 20 files simultaneously. -->
<arg name="parallel" value="20"/>

<!-- Show sniff codes in all reports. -->
<arg value="ps"/>

<!-- Use WordPress "Extra" Coding Standards. -->
<rule ref="WordPress-Extra">
<!-- Allow array short syntax. -->
<exclude name="Generic.Arrays.DisallowShortArraySyntax" />
<!-- Allow short prefixes. -->
<exclude name="WordPress.NamingConventions.PrefixAllGlobals.ShortPrefixPassed"/>
</rule>

<!-- Use WordPress "Docs" Coding Standards. -->
<rule ref="WordPress-Docs" />

<!-- Use WordPress PHP Compatibility. -->
<rule ref="PHPCompatibilityWP"/>

<!-- Disregard class file name rules -->
<rule ref="WordPress.Files.FileName">
<properties>
<property name="strict_class_file_names" value="false"/>
</properties>
</rule>

<!-- PHP version -->
<config name="testVersion" value="8.0-"/>

<!-- Only sniff PHP files. -->
<arg name="extensions" value="php"/>

<!-- Only sniff the theme. -->
<file>./</file>

<!-- Don't sniff the following directories or file types. -->
<exclude-pattern>/build/*</exclude-pattern>
<exclude-pattern>/node_modules/*</exclude-pattern>
<exclude-pattern>/vendor/*</exclude-pattern>
</ruleset>
13 changes: 13 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
...require( '@wordpress/prettier-config' ),
overrides: [
{
files: [ '*.json', '*.yml' ],
options: {
singleQuote: false,
tabWidth: 2,
useTabs: false,
},
},
],
};
12 changes: 12 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
extends: [ '@wordpress/stylelint-config', 'stylelint-config-prettier' ],
rules: {
'string-quotes': 'single',
},
overrides: [
{
files: [ '*.scss', '**/*.scss' ],
customSyntax: 'postcss-scss',
},
],
};
40 changes: 40 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Contributing <!-- omit in toc -->

Here are the ways to get involved with this project:

- [Submitting issues](#submitting-issues)
- [Contributing code](#contributing-code)
- [Git Workflow](#git-workflow)
- [Legal Stuff](#legal-stuff)

## Submitting issues

Before submitting your issue, make sure it has not been mentioned earlier. You can search through the [existing issues](https://github.com/gregrickaby/grd-bb-child/issues).

---

## Contributing code

Found a bug you can fix? Fantastic! Patches are always welcome.

---

### Git Workflow

1. Fork the repo and create a feature/patch branch off `main`
2. Work locally adhering to coding standards
3. Run `npm run lint`
4. Make sure the app builds locally with `npm run build`
5. Push your code, open a PR, and fill out the PR template
6. After peer review, the PR will be merged back into `main`
7. Repeat ♻️

> Your PR must pass automated assertions and pass a peer review before it can be merged.
---

## Legal Stuff

This repo is maintained by [Greg Rickaby](https://gregrickaby.com/). By contributing code you grant its use under the [GPL 2.0](https://github.com/gregrickaby/grd-bb-child/blob/main/LICENSE).

---
Loading

0 comments on commit 2c046af

Please sign in to comment.