From b8295a240d5872110dbfd0acc2019affc85347d0 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Wed, 17 Jan 2024 11:59:37 +1100 Subject: [PATCH] Renamed demo extention to 'your_extension'. --- .circleci/config.yml | 2 +- README.md | 44 +++++++++---------- composer.json | 8 ++-- package-lock.json | 4 +- package.json | 2 +- .../src/Functional/DemoRoleFunctionalTest.php | 6 +-- tests/src/Unit/ExampleUnitTest.php | 4 +- ...affold.info.yml => your_extension.info.yml | 0 8 files changed, 35 insertions(+), 35 deletions(-) rename drupal_extension_scaffold.info.yml => your_extension.info.yml (100%) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1d13548..125256c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,4 +1,4 @@ -# @see https://github.com/AlexSkrypnyk/drupal_extension_scaffold +# @see https://github.com/AlexSkrypnyk/your_extension version: 2 aliases: diff --git a/README.md b/README.md index 8e84a8a..8e788a1 100644 --- a/README.md +++ b/README.md @@ -34,19 +34,25 @@ to [drupal.org](https://drupal.org). - PHP version matrix for [8.2](https://www.php.net/supported-versions.php) and [8.1](https://www.php.net/supported-versions.php). - Drupal version matrix: `stable`, `next` and `last EOL` version. - - CI providers: [CircleCI](.circleci/config.yml), (GitHub Actions coming soon) + - CI providers: + - [CircleCI](.circleci/config.yml) + - GitHub Actions (coming soon) - Tools: - Develop locally using PHP running on your host using identical [`.devtools`](.devtools) scripts as in CI. - - PHP code standards checking against `Drupal` and `DrupalPractice` standards. - - PHP code static analysis - with PHPStan (including [PHPStan Drupal](https://github.com/mglaman/phpstan-drupal)). - - PHP deprecated code analysis - with [Drupal Rector](https://github.com/palantirnet/drupal-rector). - - Twig code analysis with [TwigCS](https://github.com/friendsoftwig/twigcs). + ![Build process](https://user-images.githubusercontent.com/378794/253732550-20bd3877-cabb-4a5a-b9a6-ffb5fe6c8e3e.gif) + - Codings standards checking: + - PHP code standards checking against `Drupal` and `DrupalPractice` standards. + - PHP code static analysis + with PHPStan (including [PHPStan Drupal](https://github.com/mglaman/phpstan-drupal)). + - PHP deprecated code analysis + with [Drupal Rector](https://github.com/palantirnet/drupal-rector). + - Twig code analysis with [TwigCS](https://github.com/friendsoftwig/twigcs). + ![Lint process](https://user-images.githubusercontent.com/378794/253732548-9403e4cc-db03-4696-b114-32517ab0a571.gif) - Drupal's Simpletest testing support - runs tests in the same way as [drupal.org](https://drupal.org)'s Drupal CI bot (`core/scripts/run-tests.sh`). + ![Test process](https://user-images.githubusercontent.com/378794/253732542-ea1b2f29-ce89-41bd-b92a-169b119731d3.gif) - Support for including of additional dependencies for integration testing between extensions (add dependency into [`suggest`](composer.json#L25) section of `composer.json`). @@ -69,7 +75,7 @@ to [drupal.org](https://drupal.org). UI. 3. Copy the contents of the downloaded archive into your extension's repository. 4. Adjust the codebase: - 1. Replace `drupal_extension_scaffold` with the machine name of your extension: + 1. Replace `your_extension` with the machine name of your extension: 2. Update `type: theme` in the `info.yml` file if your extension is a theme. 3. Adjust several lines in `.gitattributes`. 4. Remove `.github/test-scaffold.yml` file. @@ -133,18 +139,18 @@ ssh-keygen -m PEM -t rsa -b 4096 -C "your_email@example.com"

- Yourproject logo + Yourproject logo

-

Drupal extension scaffold

+

Your extension

-[![GitHub Issues](https://img.shields.io/github/issues/AlexSkrypnyk/drupal_extension_scaffold.svg)](https://github.com/AlexSkrypnyk/drupal_extension_scaffold/issues) -[![GitHub Pull Requests](https://img.shields.io/github/issues-pr/AlexSkrypnyk/drupal_extension_scaffold.svg)](https://github.com/AlexSkrypnyk/drupal_extension_scaffold/pulls) -[![CircleCI](https://circleci.com/gh/AlexSkrypnyk/drupal_extension_scaffold.svg?style=shield)](https://circleci.com/gh/AlexSkrypnyk/drupal_extension_scaffold) -![GitHub release (latest by date)](https://img.shields.io/github/v/release/AlexSkrypnyk/drupal_extension_scaffold) -![LICENSE](https://img.shields.io/github/license/AlexSkrypnyk/drupal_extension_scaffold) +[![GitHub Issues](https://img.shields.io/github/issues/AlexSkrypnyk/your_extension.svg)](https://github.com/AlexSkrypnyk/your_extension/issues) +[![GitHub Pull Requests](https://img.shields.io/github/issues-pr/AlexSkrypnyk/your_extension.svg)](https://github.com/AlexSkrypnyk/your_extension/pulls) +[![CircleCI](https://circleci.com/gh/AlexSkrypnyk/your_extension.svg?style=shield)](https://circleci.com/gh/AlexSkrypnyk/your_extension) +![GitHub release (latest by date)](https://img.shields.io/github/v/release/AlexSkrypnyk/your_extension) +![LICENSE](https://img.shields.io/github/license/AlexSkrypnyk/your_extension) ![Renovate](https://img.shields.io/badge/renovate-enabled-green?logo=renovatebot) ![Drupal 9](https://img.shields.io/badge/Drupal-9-blue.svg) ![Drupal 10](https://img.shields.io/badge/Drupal-10-blue.svg) @@ -171,13 +177,11 @@ the provided scripts. ### Build -Run `.devtools/build.sh` (or `ahoy build` +Run `.devtools/build-codebase.sh` (or `ahoy build-codebase` if [Ahoy](https://github.com/ahoy-cli/ahoy) is installed) to start inbuilt PHP server locally and run the same commands as in CI, plus installing a site and your extension automatically. -![Build process](https://user-images.githubusercontent.com/378794/253732550-20bd3877-cabb-4a5a-b9a6-ffb5fe6c8e3e.gif) - ### Code linting Run tools individually (or `ahoy lint` to run all tools @@ -201,16 +205,12 @@ vendor/bin/twigcs - Rector config: [`rector.php`](rector.php) - TwigCS config: [`.twig_cs.php`](.twig_cs.php) -![Lint process](https://user-images.githubusercontent.com/378794/253732548-9403e4cc-db03-4696-b114-32517ab0a571.gif) - ### Tests Run `.devtools/test.sh` (or `ahoy test` if [Ahoy](https://github.com/ahoy-cli/ahoy) is installed) to run all test for your extension. -![Test process](https://user-images.githubusercontent.com/378794/253732542-ea1b2f29-ce89-41bd-b92a-169b119731d3.gif) - ### Browsing SQLite database To browse the contents of created SQLite database diff --git a/composer.json b/composer.json index 9b9aa9f..229027a 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "drupal/drupal_extension_scaffold", + "name": "drupal/your_extension", "description": "Drupal module scaffold example.", "type": "drupal-module", "license": "GPL-2.0-or-later", @@ -11,10 +11,10 @@ "role": "Maintainer" } ], - "homepage": "https://drupal.org/project/drupal_extension_scaffold", + "homepage": "https://drupal.org/project/your_extension", "support": { - "issues": "https://drupal.org/project/issues/drupal_extension_scaffold", - "source": "https://git.drupalcode.org/project/drupal_extension_scaffold" + "issues": "https://drupal.org/project/issues/your_extension", + "source": "https://git.drupalcode.org/project/your_extension" }, "require": { "php": ">=8.1" diff --git a/package-lock.json b/package-lock.json index 22489f0..ce722dd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "@drupal/drupal_extension_scaffold", + "name": "@drupal/your_extension", "version": "0.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "@drupal/drupal_extension_scaffold", + "name": "@drupal/your_extension", "version": "0.1.0", "license": "GPL-2.0-or-later", "engines": { diff --git a/package.json b/package.json index e334c0d..1ae9e51 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@drupal/drupal_extension_scaffold", + "name": "@drupal/your_extension", "version": "0.1.0", "description": "Drupal module scaffold FE example used for template testing.", "license": "GPL-2.0-or-later", diff --git a/tests/src/Functional/DemoRoleFunctionalTest.php b/tests/src/Functional/DemoRoleFunctionalTest.php index 4db0636..b4922d0 100644 --- a/tests/src/Functional/DemoRoleFunctionalTest.php +++ b/tests/src/Functional/DemoRoleFunctionalTest.php @@ -2,7 +2,7 @@ declare(strict_types = 1); -namespace Drupal\Tests\drupal_extension_scaffold\Functional; +namespace Drupal\Tests\your_extension\Functional; use Drupal\Tests\BrowserTestBase; @@ -11,14 +11,14 @@ * * Role testing for demo module. * - * @group drupal_extension_scaffold + * @group your_extension */ class DemoRoleFunctionalTest extends BrowserTestBase { /** * {@inheritdoc} */ - protected static $modules = ['pathauto', 'drupal_extension_scaffold']; + protected static $modules = ['pathauto', 'your_extension']; /** * {@inheritdoc} diff --git a/tests/src/Unit/ExampleUnitTest.php b/tests/src/Unit/ExampleUnitTest.php index 2a790f3..04aab5c 100644 --- a/tests/src/Unit/ExampleUnitTest.php +++ b/tests/src/Unit/ExampleUnitTest.php @@ -2,7 +2,7 @@ declare(strict_types = 1); -namespace Drupal\Tests\drupal_extension_scaffold\Unit; +namespace Drupal\Tests\your_extension\Unit; use Drupal\Tests\UnitTestCase; @@ -11,7 +11,7 @@ * * Demo test class to ensure that tests are discovered and can be ran. * - * @group drupal_extension_scaffold + * @group your_extension */ class ExampleUnitTest extends UnitTestCase { diff --git a/drupal_extension_scaffold.info.yml b/your_extension.info.yml similarity index 100% rename from drupal_extension_scaffold.info.yml rename to your_extension.info.yml