Skip to content

Commit

Permalink
Merge 6f4e4cf into d2c18b5
Browse files Browse the repository at this point in the history
  • Loading branch information
tomusborne authored Nov 19, 2024
2 parents d2c18b5 + 6f4e4cf commit a3af760
Show file tree
Hide file tree
Showing 326 changed files with 23,078 additions and 23,862 deletions.
19 changes: 18 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
"generateBlocksStyling": "readonly",
"generateBlocksSettings": "readonly",
"generateBlocksLegacyDefaults": "readonly",
"generateBlocksPatternLibrary": "readonly"
"generateBlocksPatternLibrary": "readonly",
"generateblocksBlockMedia": "readonly",
"generateBlocksEditor": "readonly",
"generateblocksDashboard": "readonly"
},
"env": {
"browser": true,
Expand All @@ -33,6 +36,20 @@
"settings": {
"react": {
"pragma": "wp"
},
"import/resolver": {
"node": {
"extensions": [".js", ".jsx"]
},
"eslint-import-resolver-custom-alias": {
"extensions": [".js", ".jsx"],
"alias": {
"@utils": "./src/utils",
"@components": "./src/components",
"@hooks": "./src/hooks",
"@hoc": "./src/hoc"
}
}
}
},
"rules": {
Expand Down
23 changes: 19 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,13 @@ jobs:
if: steps.js-files.outputs.any_changed == 'true'
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: 'npm'

- name: Configure npm for private registry
if: steps.js-files.outputs.any_changed == 'true'
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc

- name: Download deps
if: steps.js-files.outputs.any_changed == 'true'
uses: bahmutov/npm-install@v1
Expand Down Expand Up @@ -77,9 +81,13 @@ jobs:
if: steps.js-files.outputs.any_changed == 'true'
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: 'npm'

- name: Configure npm for private registry
if: steps.js-files.outputs.any_changed == 'true'
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc

- name: Download deps
if: steps.js-files.outputs.any_changed == 'true'
uses: bahmutov/npm-install@v1
Expand Down Expand Up @@ -111,9 +119,13 @@ jobs:
if: steps.js-files.outputs.any_changed == 'true'
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: 'npm'

- name: Configure npm for private registry
if: steps.js-files.outputs.any_changed == 'true'
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc

- name: Download deps
if: steps.js-files.outputs.any_changed == 'true'
uses: bahmutov/npm-install@v1
Expand Down Expand Up @@ -209,7 +221,10 @@ jobs:
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 14
node-version: 18

- name: Configure npm for private registry
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc

- name: Download deps
uses: bahmutov/npm-install@v1
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ composer.lock
## keep compiled files out of version control
# dist/
.phpunit.result.cache
.npmrc
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ module.exports = function( grunt ) {
'!*.sh',
'!*.map',
'!Gruntfile.js',
'!package.json',
'!.gitignore',
'!phpunit.xml',
'!README.md',
Expand All @@ -39,6 +38,7 @@ module.exports = function( grunt ) {
'!.eslintrc.json',
'!*.zip',
'!.nvmrc',
'!config/**',
],
dest: 'package/generateblocks/',
},
Expand Down
12 changes: 12 additions & 0 deletions assets/css/dashboard-global.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,15 @@
font-size: 18px;
margin-top: 1px;
}

#adminmenu #toplevel_page_generateblocks a[href="admin.php?page=generateblocks-upgrade"] {
font-weight: 600;
background-color: #0171d5;
color: #fff;
margin: 3px 10px 0;
display: block;
text-align: center;
border-radius: 3px;
transition: all .3s;
box-shadow: 0 0 0;
}
205 changes: 0 additions & 205 deletions assets/css/dashboard.css

This file was deleted.

Binary file added assets/images/placeholder1280x720.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/placeholder800x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions config/webpack-dependency-extraction.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
const WPDependencyExtractionWebpackPlugin = require( '@wordpress/dependency-extraction-webpack-plugin' );

class DependencyExtractionWebpackPlugin extends WPDependencyExtractionWebpackPlugin {
/**
* Extend the default stringify behavior to sort dependencies by name before returning them.
*
* @param {any} asset Asset Data
* @return {string} Stringified asset data suitable for output
*/
stringify( asset ) {
const prefix = 'generateblocks-';
const sortedDeps = asset.dependencies.sort( ( a, b ) => {
const aMatches = a.startsWith( prefix );
const bMatches = b.startsWith( prefix );

if ( aMatches && ! bMatches ) {
return 1;
}
if ( bMatches && ! aMatches ) {
return -1;
}

return a.localeCompare( b );
} );

const updatedAsset = { ...asset, dependencies: sortedDeps };

// Fallback to the original method with the updated asset.
return super.stringify( updatedAsset );
}
}

module.exports = DependencyExtractionWebpackPlugin;
1 change: 1 addition & 0 deletions dist/block-styles-imported.asset.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives', 'wp-url'), 'version' => 'efa82fe89c6f1a14f7be');
1 change: 1 addition & 0 deletions dist/block-styles.asset.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php return array('dependencies' => array(), 'version' => 'a4522fa7e290a23cd862');
1 change: 1 addition & 0 deletions dist/block-styles.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a3af760

Please sign in to comment.