Skip to content

Commit

Permalink
Merge pull request #2276 from Codeinwp/fix/issue-196
Browse files Browse the repository at this point in the history
feat: add themeisle-sdk to Blocks Animation
  • Loading branch information
HardeepAsrani authored Jul 30, 2024
2 parents 27bbb24 + 97d32a5 commit 9c4b6c1
Show file tree
Hide file tree
Showing 5 changed files with 115 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ module.exports = function( grunt ) {
options: {
flags: ''
},
src: [ 'package.json', 'composer.json', 'package-lock.json' ]
src: [ 'package.json', 'composer.json', 'package-lock.json', 'plugins/blocks-animation/composer.json' ]
},
metatag: {
options: {
Expand Down
5 changes: 5 additions & 0 deletions bin/dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ do

cd plugins/$BUILD_NAME

# We install dependencies only if composer.json exists.
if [ -f "composer.json" ]; then
composer install --no-dev
fi

rsync -rc --exclude-from ".distignore" "./" "../../dist/$DIST_FOLDER"

cd ../..
Expand Down
15 changes: 15 additions & 0 deletions plugins/blocks-animation/blocks-animation.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,21 @@
define( 'BLOCKS_ANIMATION_URL', plugins_url( '/', __FILE__ ) );
define( 'BLOCKS_ANIMATION_PATH', dirname( __FILE__ ) );

$vendor_file = BLOCKS_ANIMATION_PATH . '/vendor/autoload.php';

if ( is_readable( $vendor_file ) ) {
require_once $vendor_file;
}

add_filter(
'themeisle_sdk_products',
function ( $products ) {
$products[] = __FILE__;

return $products;
}
);

add_action(
'plugins_loaded',
function () {
Expand Down
32 changes: 32 additions & 0 deletions plugins/blocks-animation/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "codeinwp/blocks-animation",
"description": "Blocks Animation: CSS Animations for Gutenberg Blocks",
"type": "wordpress-plugin",
"version": "2.6.13",
"license": "GPL-2.0+",
"authors": [
{
"name": "ThemeIsle Team",
"email": "[email protected]"
}
],
"prefer-stable": true,
"config": {
"optimize-autoloader": true,
"platform": {
"php": "7.4"
}
},
"extra": {
"installer-disable": "true"
},
"autoload": {
"files": [
"vendor/codeinwp/themeisle-sdk/load.php"
]
},
"minimum-stability": "dev",
"require": {
"codeinwp/themeisle-sdk": "^3.2"
}
}
62 changes: 62 additions & 0 deletions plugins/blocks-animation/composer.lock

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

0 comments on commit 9c4b6c1

Please sign in to comment.