From 92da851e8fa3aa8e1f40ca732463b89ec15cb473 Mon Sep 17 00:00:00 2001 From: Wilmer Arambula <42547589+terabytesoftw@users.noreply.github.com> Date: Fri, 17 Nov 2023 06:54:52 -0300 Subject: [PATCH] Use `yii2-extensions/asset-bootstrap5`. (#2) --- composer.json | 17 ++++++++++++++-- src/BootstrapAsset.php | 32 ----------------------------- src/BootstrapPluginAsset.php | 39 ------------------------------------ src/BootstrapWidgetTrait.php | 1 + src/ButtonGroup.php | 1 + src/ButtonToolbar.php | 1 + src/Dropdown.php | 1 + src/Nav.php | 1 + src/NavBar.php | 1 + src/Progress.php | 1 + tests/TestCase.php | 4 ++-- 11 files changed, 24 insertions(+), 75 deletions(-) delete mode 100644 src/BootstrapAsset.php delete mode 100644 src/BootstrapPluginAsset.php diff --git a/composer.json b/composer.json index 343d79a..8f00d4f 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,8 @@ "prefer-stable": true, "require": { "php": ">=8.1", - "npm-asset/bootstrap": "^5.3", + "oomphinc/composer-installers-extender": "^2.0", + "yii2-extensions/asset-bootstrap5": "dev-main", "yiisoft/yii2": "^2.2" }, "require-dev": { @@ -38,12 +39,24 @@ }, "config-plugin": { "yii2-bootstrap5": "extension.php" + }, + "installer-types": [ + "bower-asset", + "npm-asset" + ], + "installer-paths": { + "./node_modules/{$name}": [ + "type:bower-asset", + "type:npm-asset" + ] } }, "config": { "sort-packages": true, "allow-plugins": { - "yiisoft/yii2-composer": true + "yiisoft/yii2-composer": true, + "composer/installers": true, + "oomphinc/composer-installers-extender": true } }, "scripts": { diff --git a/src/BootstrapAsset.php b/src/BootstrapAsset.php deleted file mode 100644 index 71949ae..0000000 --- a/src/BootstrapAsset.php +++ /dev/null @@ -1,32 +0,0 @@ - dirname(__DIR__) . '/vendor', 'language' => 'en-US', 'aliases' => [ - '@bower' => '@vendor/bower-asset', - '@npm' => '@vendor/npm-asset', + '@bower' => dirname(__DIR__) . '/node_modules', + '@npm' => dirname(__DIR__) . '/node_modules', ], 'components' => [ 'i18n' => [