Skip to content

Commit

Permalink
Merge pull request #125 from gregrickaby/develop
Browse files Browse the repository at this point in the history
simplify repo. add app router support.
  • Loading branch information
gregrickaby authored Oct 20, 2023
2 parents d8580c7 + 6f561f8 commit c515a41
Show file tree
Hide file tree
Showing 126 changed files with 3,274 additions and 9,309 deletions.
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# WordPress GraphQL API URL.
NEXT_PUBLIC_WORDPRESS_URL="https://wordpress.nextjswp.com/graphql"

# Allow self-signed SSL certificates for working with local development environments.
NODE_TLS_REJECT_UNAUTHORIZED=0
5 changes: 1 addition & 4 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
!/.*.js
/.*.js
*.min.js
.*cache/
.next/
.turbo/
.vercel/
build/
dist/
node_modules/
public/
vendor/
11 changes: 5 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
module.exports = {
root: true,
extends: ['custom'],
settings: {
next: {
rootDir: ['apps/*/']
}
extends: ['next/core-web-vitals', 'prettier'],
rules: {
'@next/next/no-img-element': 'off',
'func-style': ['error', 'declaration'],
'no-console': ['error', {allow: ['warn', 'error']}]
}
}
12 changes: 0 additions & 12 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,3 @@ updates:
schedule:
interval: 'weekly'
day: 'monday'

- package-ecosystem: 'npm'
directory: '/apps/docs'
schedule:
interval: 'weekly'
day: 'monday'

- package-ecosystem: 'npm'
directory: '/apps/nextjs'
schedule:
interval: 'weekly'
day: 'monday'
37 changes: 6 additions & 31 deletions .github/workflows/assertions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,51 +2,26 @@ name: Assertions

on:
pull_request:
branches: ['main']
branches: [main]

workflow_dispatch:

jobs:
assertions:
lint:
runs-on: ubuntu-latest

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

steps:
- name: Checkout Repository
- name: Checkout repository
uses: actions/checkout@v3
with:
token: ${{ github.token }}

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

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

- name: Cache 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: Setup Node
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
cache: 'npm'

- name: Install Dependencies
run: |
composer install
npm ci
- name: Install dependencies
run: npm ci

- name: Lint Codebase
- name: Lint scripts
run: npm run lint
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
# The branches below must be a subset of the branches above
branches: ['main']
schedule:
- cron: '34 7 * * 1'
- cron: '28 23 * * 0'

jobs:
analyze:
Expand Down
53 changes: 0 additions & 53 deletions .github/workflows/deploy-backend.yml

This file was deleted.

30 changes: 9 additions & 21 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# See https://theapache64.github.io/git-do-not-ignore/ for more about ignoring files.

# dependencies
node_modules
vendor
/node_modules
/.pnp
.pnp.js

# testing
coverage
/coverage

# next.js
/.next/
/out/

# production
build
/build

# misc
.DS_Store
Expand All @@ -21,27 +23,13 @@ build
npm-debug.log*
yarn-debug.log*
yarn-error.log*
debug.log*

# local env files
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo

# next.js
.next/
out/

# wordpress
wp-content/

# turbo
.turbo
next-env.d.ts
12 changes: 0 additions & 12 deletions .markdownlint.json

This file was deleted.

11 changes: 0 additions & 11 deletions .markdownlintignore

This file was deleted.

49 changes: 0 additions & 49 deletions .phpcs.xml

This file was deleted.

5 changes: 1 addition & 4 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
!/.*.js
/.*.js
*.min.js
.*cache/
.next/
.turbo/
.vercel/
build/
dist/
node_modules/
public/
vendor/
9 changes: 7 additions & 2 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
module.exports = {
...require("./packages/prettier-config-custom/"),
};
tabWidth: 2,
useTabs: false,
singleQuote: true,
bracketSpacing: false,
semi: false,
trailingComma: 'none'
}
5 changes: 1 addition & 4 deletions apps/nextjs/.eslintignore → .stylelintignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
!/.*.js
/.*.js
*.min.js
.*cache/
.next/
.turbo/
.vercel/
build/
dist/
node_modules/
public/
vendor/
22 changes: 22 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module.exports = {
extends: ['stylelint-config-standard'],
rules: {
'at-rule-no-unknown': [
true,
{
ignoreAtRules: [
'tailwind',
'apply',
'layer',
'variants',
'responsive',
'screen'
]
}
],
'declaration-block-trailing-semicolon': null,
'no-descending-specificity': null,
'selector-class-pattern': null,
'max-line-length': null
}
}
3 changes: 1 addition & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"recommendations": [
"EditorConfig.EditorConfig",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"valeryanm.vscode-phpsab"
"esbenp.prettier-vscode"
]
}
4 changes: 0 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnPaste": true,
"editor.formatOnSave": true,
"eslint.alwaysShowStatus": true,
"eslint.format.enable": false,
"eslint.run": "onSave",
"javascript.suggest.autoImports": true,
Expand All @@ -21,8 +20,5 @@
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
},
"[php]": {
"editor.defaultFormatter": "valeryanm.vscode-phpsab"
}
}
4 changes: 0 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ Before submitting your issue, make sure it has not been mentioned earlier. You c

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

### Development Setup

Follow the [Quick Start guide](https://github.com/gregrickaby/nextjs-wordpress#quick-start) to get the project up and running.

---

### Git Workflow
Expand Down
Loading

1 comment on commit c515a41

@vercel
Copy link

@vercel vercel bot commented on c515a41 Oct 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.