Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed wpeg to wp-scripts #201

Merged
merged 57 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
e05b608
moved src to root folder and added based wp scripts config
Fellan-91 Nov 14, 2023
e3f2210
replaced the call to wp components with import constructions
Fellan-91 Nov 22, 2023
33deda7
added vendor assets
Fellan-91 Nov 22, 2023
d6bfb67
updated package
Fellan-91 Nov 22, 2023
02ec97e
fixed ToolsPanelItem module build failed
Fellan-91 Nov 22, 2023
2cda9e6
build
Fellan-91 Nov 22, 2023
c7446ea
replaced @@plugin_name to ghostkit
Fellan-91 Nov 27, 2023
1be6d0e
replaced @@text_domain to ghostkit
Fellan-91 Nov 27, 2023
bd22ce4
replaced @@plugin_version to number
Fellan-91 Nov 27, 2023
959c609
fixed include composer vendor for background processing
Fellan-91 Nov 27, 2023
60c9d24
added enqueue and register methods to simplify work with build assets
Fellan-91 Nov 27, 2023
90d23af
changed enqueue and register assets to new methods
Fellan-91 Nov 27, 2023
11fc140
fixed svg import for work with new builder
Fellan-91 Nov 27, 2023
80ba962
fixed wp-scripts config for style chunks
Fellan-91 Nov 27, 2023
22d5e77
build
Fellan-91 Nov 27, 2023
613f7f3
replaced @@plugin_version to variable
Fellan-91 Nov 28, 2023
1d50083
build
Fellan-91 Nov 28, 2023
acc053c
added support for file change time when enqueue asset without .asset.…
Fellan-91 Dec 6, 2023
a02df06
fixed phpcs configuration
Fellan-91 Dec 6, 2023
d04c08b
phpcs
Fellan-91 Dec 6, 2023
926984c
added prettier configurations
Fellan-91 Dec 8, 2023
02068f9
removed wpeg
Fellan-91 Dec 8, 2023
e61c82d
replaced stylelint and eslint to wp scripts linters
Fellan-91 Dec 8, 2023
b483708
added wp-env configurations
Fellan-91 Dec 8, 2023
8d574cd
added gulp tasks
Fellan-91 Dec 8, 2023
d1ec3c1
added inex.php
Fellan-91 Dec 8, 2023
13d6656
added translate pot and json files
Fellan-91 Dec 8, 2023
0560bfe
updated dependencies
Fellan-91 Dec 8, 2023
7f1ec8e
updated linters and packages
Fellan-91 Dec 15, 2023
71fa05b
added tests
Fellan-91 Dec 15, 2023
f4541a2
lint
Fellan-91 Dec 15, 2023
d85eb92
build
Fellan-91 Dec 15, 2023
5ef4100
added vscode exclude config for prettier
Fellan-91 Dec 18, 2023
cf76017
added yml github hooks
Fellan-91 Dec 19, 2023
1d6aa4d
fixed package from test
Fellan-91 Dec 19, 2023
c6b331a
fixed fallback CSS block margins for form fields
nk-o Dec 26, 2023
87c10ca
Update settings.json
nk-o Dec 26, 2023
f5b74e9
fixed typo
nk-o Dec 26, 2023
b4468b3
deleted comments from js dependencies and lintered
Fellan-91 Dec 26, 2023
0ac1219
lintered tests
Fellan-91 Dec 26, 2023
bd21d95
removed google maps react library
nk-o Feb 4, 2024
9a82e2f
removed react lazyload and masonry, as no longer used
nk-o Feb 4, 2024
84fd896
updated some deps
nk-o Feb 4, 2024
330108f
fixed migration to new Ghost Kit attributes from deprecated blocks
Fellan-91 Feb 5, 2024
f815e50
changed Spring transition defaults
Fellan-91 Feb 5, 2024
3b76bde
changed ProNote component in Reveal effect to collapsed version to no…
Fellan-91 Feb 6, 2024
5f65392
Update class-breakpoints.php
Fellan-91 Feb 6, 2024
30f77aa
resolved master conflicts
Fellan-91 Feb 6, 2024
022803d
added git ignored files
Fellan-91 Feb 6, 2024
5893099
added gitkeep
Fellan-91 Feb 6, 2024
6d939a2
eslinted
Fellan-91 Feb 6, 2024
3a3f16f
added test for plugin path and url
Fellan-91 Feb 6, 2024
81d6a16
updated number of minimum expected tests to run in actions
Fellan-91 Feb 6, 2024
9c48190
updated lock files
Fellan-91 Feb 6, 2024
b8104ca
fixed video block
Fellan-91 Feb 6, 2024
26ec33c
build
Fellan-91 Feb 6, 2024
8cd2c87
fixed version number
nk-o Feb 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion .browserslistrc

This file was deleted.

File renamed without changes.
28 changes: 28 additions & 0 deletions .distignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Directories to ignore
/.git
/.cache
/.github
/.husky
/.vscode
/.wordpress-org
/artifacts
/dist-zip
/node_modules
/tests
/vendor

# Files to ignore
/.*
/composer.json
/composer.lock
/gulpfile.js
/LICENSE.txt
/lint-staged.config.js
/package-lock.json
/package.json
/phpcs.xml
/phpcs.xml.dist
/phpunit.xml
/phpunit.xml.dist
/README.md
/webpack.config.js
8 changes: 4 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_style = tab

[*.php]
indent_size = 4
[*.yml]
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
assets/vendor/**
18 changes: 0 additions & 18 deletions .eslintrc

This file was deleted.

40 changes: 40 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
const groups = {
// The default grouping, but with no blank lines.
groups: [
// Side effect imports.
['^\\u0000'],
// Node.js builtins prefixed with `node:`.
['^node:'],
// Packages.
// Things that start with a letter (or digit or underscore), or `@` followed by a letter.
['^@?\\w'],
// WordPress imports
['^@wordpress'],
// Absolute imports and other imports such as Vue-style `@/foo`.
// Anything not matched in another group.
['^'],
// Relative imports.
// Anything that starts with a dot.
['^\\.'],
],
};

module.exports = {
extends: ['plugin:@wordpress/eslint-plugin/recommended'],
rules: {
'@wordpress/no-unsafe-wp-apis': 0,
'@wordpress/i18n-translator-comments': 0,
'jsdoc/no-undefined-types': 0,
'jsdoc/require-param-type': 0,
'jsdoc/require-returns-description': 0,
'jsdoc/check-tag-names': 0,
'react-hooks/rules-of-hooks': 0,
'jsdoc/check-param-names': 0,
'simple-import-sort/imports': ['error', groups],
'simple-import-sort/exports': 'error',
},
settings: {
'import/core-modules': ['jquery', 'lodash'],
},
plugins: ['simple-import-sort'],
};
44 changes: 44 additions & 0 deletions .github/setup-node/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: 'Setup Node.js and install npm dependencies'
description: 'Configure Node.js and install npm dependencies while managing all aspects of caching.'
inputs:
node-version:
description: 'Optional. The Node.js version to use. When not specified, the version specified in .nvmrc will be used.'
required: false
type: string

runs:
using: 'composite'
steps:
- name: Use desired version of Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
node-version: ${{ inputs.node-version }}
cache: npm

- name: Get Node.js and npm version
id: node-version
run: |
echo "NODE_VERSION=$(node -v)" >> $GITHUB_OUTPUT
shell: bash

- name: Cache node_modules
id: cache-node_modules
uses: actions/cache@v3
with:
path: '**/node_modules'
key: node_modules-${{ runner.os }}-${{ steps.node-version.outputs.NODE_VERSION }}-${{ hashFiles('package-lock.json') }}

- name: Install npm dependencies
if: ${{ steps.cache-node_modules.outputs.cache-hit != 'true' }}
run: npm ci
shell: bash

# On cache hit, we run the post-install script to match the native `npm ci` behavior.
# An example of this is to patch `node_modules` using patch-package.
- name: Post-install
if: ${{ steps.cache-node_modules.outputs.cache-hit == 'true' }}
run: |
# Run the post-install script for the root project.
npm run postinstall
shell: bash
33 changes: 0 additions & 33 deletions .github/workflows/deploy.yml

This file was deleted.

22 changes: 22 additions & 0 deletions .github/workflows/push-asset-readme-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Plugin Asset/Readme Update

on:
workflow_dispatch:
push:
branches:
- master

jobs:
trunk:
name: Push to trunk
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: WordPress.org plugin asset/readme update
uses: 10up/action-wordpress-plugin-asset-update@stable
env:
SLUG: ghostkit
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
22 changes: 22 additions & 0 deletions .github/workflows/push-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Deploy to WordPress.org

on:
workflow_dispatch:
push:
tags:
- 'v*'

jobs:
tag:
name: New release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: WordPress Plugin Deploy
uses: 10up/action-wordpress-plugin-deploy@stable
env:
SLUG: ghostkit
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
48 changes: 48 additions & 0 deletions .github/workflows/tests-e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: End-to-End Tests

on:
pull_request:
push:
branches:
- master
# Allow manually triggering the workflow.
workflow_dispatch:

# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
# The concurrency group contains the workflow name and the branch name for pull requests
# or the commit hash for any other events.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true

jobs:
playwright:
name: Playwright - ${{ matrix.part }}
runs-on: ubuntu-latest
if: ${{ github.repository == 'nk-crew/ghostkit' || github.event_name == 'pull_request' }}
strategy:
fail-fast: false
matrix:
part: [1, 2, 3, 4]
totalParts: [4]

steps:
- uses: actions/checkout@v3

- name: Setup Node.js and install dependencies
uses: ./.github/setup-node

- name: Npm build
run: npm run build

- name: Install Playwright dependencies
run: |
npx playwright install chromium firefox webkit --with-deps

- name: Install WordPress and start the server
run: |
npm run wp-env start

- name: Run the tests
run: |
xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run test:e2e -- --shard=${{ matrix.part }}/${{ matrix.totalParts }}
Loading
Loading