Skip to content

Commit e661e51

Browse files
authored
feat!: update packages and sass compilation (#46)
* chore: update package dependencies * fix: replace deprecated jQuery ready function * fix: output home URL on 404 page * doc: improve readability * feat(sass): replace dart-sass with sass-embedded * feat(sass): replace Sass with CSS variables * feat: update to WP6.7 * style: align consistency * fix: roll back aggressive escaping in 4b6fec7 * chore: update linting rules * fix: read version from package.json using import * build: replace imagemin with sharp * build: remove obsolete includePaths * fix: enable commitlint with husky v9 * chore: update package dependencies BREAKING CHANGE: reorganise CSS structures to conform to future changes
1 parent 697204f commit e661e51

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+7023
-10832
lines changed

.eslintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"env": {
33
"browser": true,
4+
"es6": true,
45
"jquery": true
56
},
67
"globals": {
@@ -15,7 +16,7 @@
1516
"google"
1617
],
1718
"rules": {
18-
"require-jsdoc": "off"
19+
"require-jsdoc": "off" // TODO: to be removed once WP is compatible with ESLint v9
1920
},
2021
"overrides": [
2122
{

.husky/commit-msg

100755100644
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
4-
npx --no-install commitlint --edit
1+
npx --no-install commitlint --edit "$1"

.stylelintrc.json

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,8 @@
66
"rules": {
77
"at-rule-empty-line-before": null,
88
"custom-property-pattern": null,
9-
"declaration-block-no-redundant-longhand-properties": [
10-
true,
11-
{
12-
"ignoreShorthands": ["grid-template"]
13-
}
14-
],
159
"max-nesting-depth": 4,
1610
"no-descending-specificity": null,
17-
"no-invalid-position-at-import-rule": null,
18-
"selector-class-pattern": null,
1911
"selector-max-compound-selectors": 4,
2012
"selector-no-qualifying-type": [
2113
true,
@@ -24,12 +16,6 @@
2416
"severity": "warning"
2517
}
2618
],
27-
"scss/at-extend-no-missing-placeholder": [
28-
true,
29-
{
30-
"severity": "warning"
31-
}
32-
],
3319
"scss/comment-no-empty": null,
3420
"scss/dollar-variable-empty-line-before": null,
3521
"scss/double-slash-comment-empty-line-before": null,
@@ -52,9 +38,10 @@
5238
"declaration-property-value-disallowed-list": null,
5339
"max-nesting-depth": null,
5440
"rule-empty-line-before": null,
41+
"selector-class-pattern": null,
5542
"selector-max-id": null,
56-
"selector-not-notation": null,
5743
"selector-no-qualifying-type": null,
44+
"selector-not-notation": null,
5845
"scss/dollar-variable-pattern": null
5946
}
6047
}

README.mdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ To run this workflow, you should have the below installed globally. If you are o
99
* [npm](https://docs.npmjs.com/getting-started/installing-node)
1010
* [gulp-cli](https://github.com/gulpjs/gulp-cli)
1111

12-
The package comes with linter files to maintain code style and you are encouraged to have the below linters installed.
12+
The package comes with linter files to maintain code style and you are encouraged to have the below linters installed in your code editor.
1313

1414
* [ESLint](https://eslint.org/)
1515
* [Style Lint](https://stylelint.io/)
1616

1717
## Setup
1818

19-
1. Set up a local WordPress instance. [Local by Flywheel](https://localbyflywheel.com/) could be helpful.
19+
1. Set up a local WordPress instance. [Local](https://localwp.com/) could be helpful.
2020
2. Make necessary changes to composer.json and gulpconfig.js.
2121
3. If this is a fresh set-up, run `npm run setup` in the terminal to get the dev dependencies and WordPress ready; otherwise run `npm install && npm audit fix && gulp build && composer install`.
2222
4. Set up config credentials for different environments if necessary.

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525
},
2626
"require": {
2727
"wpackagist-plugin/duplicate-post": "^4.5",
28-
"wpackagist-plugin/favicon-by-realfavicongenerator": "^1.3.30",
29-
"wpackagist-plugin/imagify": "^2.2.2",
30-
"wpackagist-plugin/imsanity": "^2.8.4",
28+
"wpackagist-plugin/favicon-by-realfavicongenerator": "^1.3.37",
29+
"wpackagist-plugin/imagify": "^2.2.5",
30+
"wpackagist-plugin/imsanity": "^2.8.6",
3131
"wpackagist-plugin/svg-support": "^2.5.8",
32-
"wpackagist-plugin/wordpress-seo": "^23.2",
32+
"wpackagist-plugin/wordpress-seo": "^23.9",
3333
"wpackagist-plugin/wp-sweep": "^1.1.8"
3434
}
3535
}

composer.lock

Lines changed: 16 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gulpconfig.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const dist = './app/public';
44

55
export default {
66
assets: {
7-
src: src + '/assets/**',
7+
src: src + '/assets/**/*',
88
dest: dist + '/wp-content/themes/' + project + '/assets',
99
blocksSrc: src + '/blocks/**/*.+(gif|jpg|png|svg)',
1010
blocksDest: dist + '/wp-content/plugins/client-blocks/assets',

0 commit comments

Comments
 (0)