From cb63310371b06e47818a980607a77078a193b45d Mon Sep 17 00:00:00 2001 From: Jes Constantine Date: Wed, 7 Jun 2023 12:20:47 -0600 Subject: [PATCH 01/23] Add scaffolding for eslint to the skeleton --- .eslintignore | 1 + .eslintrc.json | 5 +++++ README.md | 11 +++++++++++ docs/general/drupal_development.md | 4 ++-- package.json | 13 +++++++++++++ 5 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 .eslintignore create mode 100644 .eslintrc.json create mode 100644 package.json diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..cede0f6 --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +# Add directories and files to ignore: https://eslint.org/docs/latest/use/configure/ignore#the-eslintignore-file diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..3eb7d12 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "extends": [ + "drupal" + ] +} diff --git a/README.md b/README.md index 8b7af7a..cfa5e7a 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,11 @@ The development dependencies are: * [DDev Local](https://ddev.com/ddev-local/) * ddev can be installed with [homebrew](https://brew.sh/): `brew install ddev` +The dependencies for linting custom javascript are: + +* [Node](https://nodejs.org/en/) version 16.x.x or greater. +* [npm](https://www.npmjs.com/get-npm) version 9.x.x or greater. + Once you have your dependencies installed, setting up this skeleton will take at least another hour, depending on your internet connection. Some of the commands below will prompt you for a response, with the default answer in brackets. For this quick start, hit return to accept each default answer: @@ -122,6 +127,11 @@ Update the `composer.json`: composer update --lock ``` +Update the `package.json`: + +* Change the `name` from `palantirnet/drupal-skeleton` to `palantirnet/PROJECTNAME` +* Update the `description` with a brief description of your project. + ### Configure your ddev development environment Go into your new project directory and update the ddev configuration in `.ddev/config.yml`. @@ -134,6 +144,7 @@ From inside ddev, run the script from `palantirnet/the-build` to set up a base D ddev start ddev ssh vendor/bin/the-build-installer + ddev npm install ``` ### Commit your work to git diff --git a/docs/general/drupal_development.md b/docs/general/drupal_development.md index b39179d..54a531d 100644 --- a/docs/general/drupal_development.md +++ b/docs/general/drupal_development.md @@ -99,11 +99,11 @@ When you make changes to these files, you will generally need to run `phing buil ### Test Drupal -This project uses Behat to test Drupal; it also provides some PHP linting tools. You can run: +This project uses Behat to test Drupal; it also provides some PHP and Javascript linting tools. You can run: * All Behat tests: `behat` * One behat test: `behat features/installation.feature` -* The PHP code review: `phing code-review` +* The PHP + JS code review: `phing code-review` ---- Copyright 2020 Palantir.net, Inc. diff --git a/package.json b/package.json new file mode 100644 index 0000000..9fbc3a2 --- /dev/null +++ b/package.json @@ -0,0 +1,13 @@ +{ + "name": "palantirnet/drupal-skeleton", + "description": "A Drupal 8 project template.", + "version": "0.0.0", + "devDependencies": { + "eslint": "8.39.0", + "eslint-plugin-yml": "1.5.0" + }, + "dependencies": { + "eslint-config-drupal": "5.0.2", + "npx": "10.2.2" + } +} From 871ac810b7849d84fa932a8dc88b0d0608ce2b97 Mon Sep 17 00:00:00 2001 From: Jes Constantine Date: Wed, 7 Jun 2023 12:46:57 -0600 Subject: [PATCH 02/23] Use node v18 in nvmrc --- .nvmrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.nvmrc b/.nvmrc index 48082f7..3c03207 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -12 +18 From b22f08b07a828d690bdbe0b9a4d3aec38bfab2cb Mon Sep 17 00:00:00 2001 From: Jes Constantine Date: Wed, 7 Jun 2023 13:12:37 -0600 Subject: [PATCH 03/23] Update docs with node version, npm context --- README.md | 2 +- docs/general/drupal_development.md | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cfa5e7a..01cfe5a 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ The development dependencies are: The dependencies for linting custom javascript are: -* [Node](https://nodejs.org/en/) version 16.x.x or greater. +* [Node](https://nodejs.org/en/) version 18.x.x or greater. * [npm](https://www.npmjs.com/get-npm) version 9.x.x or greater. Once you have your dependencies installed, setting up this skeleton will take at least another hour, depending on your internet connection. diff --git a/docs/general/drupal_development.md b/docs/general/drupal_development.md index 54a531d..7c968d4 100644 --- a/docs/general/drupal_development.md +++ b/docs/general/drupal_development.md @@ -105,5 +105,11 @@ This project uses Behat to test Drupal; it also provides some PHP and Javascript * One behat test: `behat features/installation.feature` * The PHP + JS code review: `phing code-review` +#### Javascript linting + +This project uses [eslint](https://eslint.org/docs/latest/use/) to check custom module js against Drupal js coding standards. + +If you'd like to handle your custom module's linting independently, add your module directory to the `/.eslintignore` file and add a command to additionally lint your js to the `code-review` phing target in `build.xml`. + ---- -Copyright 2020 Palantir.net, Inc. +Copyright 2023 Palantir.net, Inc. From da5009cb086a4ec87f9f6286fa67d7ed8d154dc2 Mon Sep 17 00:00:00 2001 From: Jes Constantine Date: Wed, 7 Jun 2023 13:30:57 -0600 Subject: [PATCH 04/23] Update circle to use node v 18 --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1a4572a..d573f65 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -17,7 +17,7 @@ jobs: environment: - PALANTIR_ENVIRONMENT: circleci - DRUPAL_ROOT: web - - NODE_VERSION: 8 + - NODE_VERSION: 18 steps: - run: From ee72af233dadaa2e3de2b7c139435773d6034125 Mon Sep 17 00:00:00 2001 From: Jes Constantine Date: Wed, 7 Jun 2023 13:31:28 -0600 Subject: [PATCH 05/23] TEMPORARY: pin the-build to our dev branch version for eslint --- composer.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 7ba4502..be02912 100644 --- a/composer.json +++ b/composer.json @@ -12,6 +12,10 @@ { "type": "composer", "url": "https://packages.drupal.org/8" + }, + { + "type": "git", + "url": "https://github.com/palantirnet/the-build" } ], "require": { @@ -32,7 +36,7 @@ "dmore/behat-chrome-extension": "^1.4", "drupal/core-dev": "^10", "drupal/drupal-extension": "^5@alpha", - "palantirnet/the-build": "^4@beta" + "palantirnet/the-build": "dev-dev-37-eslint" }, "suggest": { "cweagans/composer-patches": "Try ^1.7. Apply patches to packages, especially Drupal.org contrib.", From fa889dd0dec42716b082e27ec044772164dad9c3 Mon Sep 17 00:00:00 2001 From: Jes Constantine Date: Wed, 7 Jun 2023 14:32:15 -0600 Subject: [PATCH 06/23] Remove illegal character from package.json name --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9fbc3a2..1e539e4 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "palantirnet/drupal-skeleton", + "name": "palantirnet--drupal-skeleton", "description": "A Drupal 8 project template.", "version": "0.0.0", "devDependencies": { From a4f1310160d76820c8149cba003ec1f69e560a1d Mon Sep 17 00:00:00 2001 From: Jes Constantine Date: Wed, 7 Jun 2023 14:32:31 -0600 Subject: [PATCH 07/23] Add node package to check dependencies, used in phing target --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 1e539e4..fde87b0 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "description": "A Drupal 8 project template.", "version": "0.0.0", "devDependencies": { + "check-dependencies": "1.1.0", "eslint": "8.39.0", "eslint-plugin-yml": "1.5.0" }, From 4bb74e73124f761e9001632e449fdfb409e3f59f Mon Sep 17 00:00:00 2001 From: Jes Constantine Date: Wed, 7 Jun 2023 14:32:39 -0600 Subject: [PATCH 08/23] Update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 01cfe5a..941fb33 100644 --- a/README.md +++ b/README.md @@ -129,7 +129,7 @@ Update the `composer.json`: Update the `package.json`: -* Change the `name` from `palantirnet/drupal-skeleton` to `palantirnet/PROJECTNAME` +* Change the `name` from `palantirnet--drupal-skeleton` to `palantirnet--PROJECTNAME` * Update the `description` with a brief description of your project. ### Configure your ddev development environment From 797638f0abbabaea7e26563b6c4f094213ff1c2a Mon Sep 17 00:00:00 2001 From: Jes Constantine Date: Wed, 7 Jun 2023 14:34:00 -0600 Subject: [PATCH 09/23] Add npx and phing commands to ddev --- .ddev/commands/web/npx | 7 +++++++ .ddev/commands/web/phing | 5 +++++ 2 files changed, 12 insertions(+) create mode 100755 .ddev/commands/web/npx create mode 100755 .ddev/commands/web/phing diff --git a/.ddev/commands/web/npx b/.ddev/commands/web/npx new file mode 100755 index 0000000..4cdd2aa --- /dev/null +++ b/.ddev/commands/web/npx @@ -0,0 +1,7 @@ +#!/bin/bash + +## Description: Run npx which executes node binaries. +## Usage: npx [node binary] [options] +## Example: "npx eslint --ext .js docroot/modules/custom" + +node_modules/.bin/npx "$@" diff --git a/.ddev/commands/web/phing b/.ddev/commands/web/phing new file mode 100755 index 0000000..02d5980 --- /dev/null +++ b/.ddev/commands/web/phing @@ -0,0 +1,5 @@ +#!/bin/bash + +## Description: Run phing inside the shell with `ddev phing` + +vendor/bin/phing "$@" From 7fa63f0b68103bed65ea4b0cac6bd5540b20f33d Mon Sep 17 00:00:00 2001 From: Jes Constantine Date: Wed, 7 Jun 2023 14:45:07 -0600 Subject: [PATCH 10/23] Fix readme formatting for easier "quick setup" ordered list coding --- README.md | 53 +++++++++++++++++++++++------------------------------ 1 file changed, 23 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 941fb33..acb5b22 100644 --- a/README.md +++ b/README.md @@ -37,37 +37,30 @@ Enter a short name for your project [example] : ### Steps 1. Create a new project called "example" based on this template: - - ``` - composer create-project palantirnet/drupal-skeleton example dev-develop --no-interaction - ``` - - This skeleton is based on Drupal 10. If you would like to install and use Drupal 9 instead, run: - ``` - composer create-project palantirnet/drupal-skeleton example dev-drupal9 --no-interaction - ``` - -2. Go into your new project directory and update the ddev configuration in `.ddev/config.yml`: - - ``` - # Update to match your project name. Using "drupal-skeleton" would make the site - # accessible at 'drupal-skeleton.ddev.site'. - name: drupal-skeleton - - # Use 'docroot' for Acquia, or 'web' for Pantheon or Platform.sh. - docroot: web - ``` + ``` + composer create-project palantirnet/drupal-skeleton example dev-develop --no-interaction + ``` + This skeleton is based on Drupal 10. If you would like to install and use Drupal 9 instead, run: + ``` + composer create-project palantirnet/drupal-skeleton example dev-drupal9 --no-interaction + ``` +1. Go into your new project directory and update the ddev configuration in `.ddev/config.yml`: + ``` + # Update to match your project name. Using "drupal-skeleton" would make the site + # accessible at 'drupal-skeleton.ddev.site'. + name: drupal-skeleton -3. From inside the ddev environment, run the script from `palantirnet/the-build` to set up the default Drupal variables and install Drupal: - - ``` - ddev start - ddev ssh - vendor/bin/the-build-installer - ``` - -5. In your web browser, visit [http://example.ddev.site](http://example.ddev.site) -6. _Optional:_ While you are logged into the ddev environment, you can run Drush commands like `drush status`. + # Use 'docroot' for Acquia, or 'web' for Pantheon or Platform.sh. + docroot: web + ``` +1. From inside the ddev environment, run the script from `palantirnet/the-build` to set up the default Drupal variables and install Drupal: + ``` + ddev start + ddev ssh + vendor/bin/the-build-installer + ``` +1. In your web browser, visit [http://example.ddev.site](http://example.ddev.site) +1. _Optional:_ While you are logged into the ddev environment, you can run Drush commands like `drush status`. ### Extra Credit From ced6bd71892ff3ff9f6f6e5e87c9d8ac435ac985 Mon Sep 17 00:00:00 2001 From: Jes Constantine Date: Wed, 7 Jun 2023 14:59:54 -0600 Subject: [PATCH 11/23] Remove unneeded new setup step --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index acb5b22..487cdb6 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,6 @@ From inside ddev, run the script from `palantirnet/the-build` to set up a base D ddev start ddev ssh vendor/bin/the-build-installer - ddev npm install ``` ### Commit your work to git From 891471736a2187406c669ae8e397d78bf7096987 Mon Sep 17 00:00:00 2001 From: Jes Constantine Date: Wed, 7 Jun 2023 15:00:19 -0600 Subject: [PATCH 12/23] Format alltheorderedlists with 1. --- README.md | 49 +++++++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 487cdb6..90742dd 100644 --- a/README.md +++ b/README.md @@ -37,14 +37,19 @@ Enter a short name for your project [example] : ### Steps 1. Create a new project called "example" based on this template: + ``` composer create-project palantirnet/drupal-skeleton example dev-develop --no-interaction ``` + This skeleton is based on Drupal 10. If you would like to install and use Drupal 9 instead, run: + ``` composer create-project palantirnet/drupal-skeleton example dev-drupal9 --no-interaction ``` + 1. Go into your new project directory and update the ddev configuration in `.ddev/config.yml`: + ``` # Update to match your project name. Using "drupal-skeleton" would make the site # accessible at 'drupal-skeleton.ddev.site'. @@ -53,13 +58,17 @@ Enter a short name for your project [example] : # Use 'docroot' for Acquia, or 'web' for Pantheon or Platform.sh. docroot: web ``` + 1. From inside the ddev environment, run the script from `palantirnet/the-build` to set up the default Drupal variables and install Drupal: + ``` ddev start ddev ssh vendor/bin/the-build-installer ``` + 1. In your web browser, visit [http://example.ddev.site](http://example.ddev.site) + 1. _Optional:_ While you are logged into the ddev environment, you can run Drush commands like `drush status`. ### Extra Credit @@ -172,17 +181,17 @@ git push -u origin develop If you're allergic to phing and Benadryl isn't helping, you can also remove the-build: 1. `composer remove --dev palantirnet/the-build` -2. `rm -r .the-build` -3. `rm build.xml` -4. This will remove drush, coder, and phpmd -- if you want those dependencies, you'll need to add them back to your project: +1.`rm -r .the-build` +1. `rm build.xml` +1. This will remove drush, coder, and phpmd -- if you want those dependencies, you'll need to add them back to your project: ``` composer require --dev drush/drush drupal/coder phpmd/phpmd ``` -5. Review your `web/sites/default/settings.*.php` files (the-build managed these for you) -6. Install your build tooling of choice... or nothing at all... -7. _Update your project's README_ +1. Review your `web/sites/default/settings.*.php` files (the-build managed these for you) +1. Install your build tooling of choice... or nothing at all... +1. _Update your project's README_ See also: [Documentation on using the-build](https://github.com/palantirnet/the-build#using-the-build) @@ -217,24 +226,24 @@ In Drupal 8 development, all (or most) Drupal configuration should be exported a * Set the admin email address (your development environment will trap all emails) * Turn the Cron interval down to "never" * Uninstall unnecessary modules (e.g. Search, History, Comment) -2. Export your config: +1. Export your config: - ``` - drush cex -y - ``` + ``` + drush cex -y + ``` -3. You should have a ton of new `*.yml` files in `config/sites/default/`. Add them, and this config change, to git: +1. You should have a ton of new `*.yml` files in `config/sites/default/`. Add them, and this config change, to git: - ``` - git add config/ - git ci -m "Initial Drupal configuration." - git push - ``` -5. Reinstall your site and verify that your config is ready to go: + ``` + git add config/ + git ci -m "Initial Drupal configuration." + git push + ``` +1. Reinstall your site and verify that your config is ready to go: - ``` - vendor/bin/phing install - ``` + ``` + vendor/bin/phing install + ``` ## More information From 33f184eae1f9f11b2e7ee1693395e1e82156e719 Mon Sep 17 00:00:00 2001 From: Jes Constantine Date: Mon, 26 Jun 2023 09:58:03 -0600 Subject: [PATCH 13/23] Remove project-level dependencies --- .ddev/commands/web/npx | 7 ------- .ddev/commands/web/phing | 5 ----- README.md | 3 +-- package.json | 14 -------------- 4 files changed, 1 insertion(+), 28 deletions(-) delete mode 100755 .ddev/commands/web/npx delete mode 100755 .ddev/commands/web/phing delete mode 100644 package.json diff --git a/.ddev/commands/web/npx b/.ddev/commands/web/npx deleted file mode 100755 index 4cdd2aa..0000000 --- a/.ddev/commands/web/npx +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -## Description: Run npx which executes node binaries. -## Usage: npx [node binary] [options] -## Example: "npx eslint --ext .js docroot/modules/custom" - -node_modules/.bin/npx "$@" diff --git a/.ddev/commands/web/phing b/.ddev/commands/web/phing deleted file mode 100755 index 02d5980..0000000 --- a/.ddev/commands/web/phing +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -## Description: Run phing inside the shell with `ddev phing` - -vendor/bin/phing "$@" diff --git a/README.md b/README.md index 90742dd..f8fecce 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,6 @@ The development dependencies are: The dependencies for linting custom javascript are: * [Node](https://nodejs.org/en/) version 18.x.x or greater. -* [npm](https://www.npmjs.com/get-npm) version 9.x.x or greater. Once you have your dependencies installed, setting up this skeleton will take at least another hour, depending on your internet connection. @@ -250,4 +249,4 @@ In Drupal 8 development, all (or most) Drupal configuration should be exported a * Site build and install process: [palantirnet/the-build](https://github.com/palantirnet/the-build) ---- -Copyright 2016 - 2021 Palantir.net, Inc. +Copyright 2016 - 2023 Palantir.net, Inc. diff --git a/package.json b/package.json deleted file mode 100644 index fde87b0..0000000 --- a/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "palantirnet--drupal-skeleton", - "description": "A Drupal 8 project template.", - "version": "0.0.0", - "devDependencies": { - "check-dependencies": "1.1.0", - "eslint": "8.39.0", - "eslint-plugin-yml": "1.5.0" - }, - "dependencies": { - "eslint-config-drupal": "5.0.2", - "npx": "10.2.2" - } -} From 98f18f008d20f3d6c26fc848a47aebbc4df9eb99 Mon Sep 17 00:00:00 2001 From: Jes Constantine Date: Mon, 26 Jun 2023 09:58:03 -0600 Subject: [PATCH 14/23] Revert "Remove project-level dependencies" This reverts commit 33f184eae1f9f11b2e7ee1693395e1e82156e719. --- .ddev/commands/web/npx | 7 +++++++ .ddev/commands/web/phing | 5 +++++ README.md | 3 ++- package.json | 14 ++++++++++++++ 4 files changed, 28 insertions(+), 1 deletion(-) create mode 100755 .ddev/commands/web/npx create mode 100755 .ddev/commands/web/phing create mode 100644 package.json diff --git a/.ddev/commands/web/npx b/.ddev/commands/web/npx new file mode 100755 index 0000000..4cdd2aa --- /dev/null +++ b/.ddev/commands/web/npx @@ -0,0 +1,7 @@ +#!/bin/bash + +## Description: Run npx which executes node binaries. +## Usage: npx [node binary] [options] +## Example: "npx eslint --ext .js docroot/modules/custom" + +node_modules/.bin/npx "$@" diff --git a/.ddev/commands/web/phing b/.ddev/commands/web/phing new file mode 100755 index 0000000..02d5980 --- /dev/null +++ b/.ddev/commands/web/phing @@ -0,0 +1,5 @@ +#!/bin/bash + +## Description: Run phing inside the shell with `ddev phing` + +vendor/bin/phing "$@" diff --git a/README.md b/README.md index f8fecce..90742dd 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ The development dependencies are: The dependencies for linting custom javascript are: * [Node](https://nodejs.org/en/) version 18.x.x or greater. +* [npm](https://www.npmjs.com/get-npm) version 9.x.x or greater. Once you have your dependencies installed, setting up this skeleton will take at least another hour, depending on your internet connection. @@ -249,4 +250,4 @@ In Drupal 8 development, all (or most) Drupal configuration should be exported a * Site build and install process: [palantirnet/the-build](https://github.com/palantirnet/the-build) ---- -Copyright 2016 - 2023 Palantir.net, Inc. +Copyright 2016 - 2021 Palantir.net, Inc. diff --git a/package.json b/package.json new file mode 100644 index 0000000..fde87b0 --- /dev/null +++ b/package.json @@ -0,0 +1,14 @@ +{ + "name": "palantirnet--drupal-skeleton", + "description": "A Drupal 8 project template.", + "version": "0.0.0", + "devDependencies": { + "check-dependencies": "1.1.0", + "eslint": "8.39.0", + "eslint-plugin-yml": "1.5.0" + }, + "dependencies": { + "eslint-config-drupal": "5.0.2", + "npx": "10.2.2" + } +} From 8be8573bdaa9d6516fa6f89fb1c711bd680f9735 Mon Sep 17 00:00:00 2001 From: Jes Constantine Date: Thu, 13 Jul 2023 09:11:27 -0600 Subject: [PATCH 15/23] Remove unneeded package dependencies --- package.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index fde87b0..3943043 100644 --- a/package.json +++ b/package.json @@ -3,12 +3,8 @@ "description": "A Drupal 8 project template.", "version": "0.0.0", "devDependencies": { - "check-dependencies": "1.1.0", "eslint": "8.39.0", - "eslint-plugin-yml": "1.5.0" - }, - "dependencies": { - "eslint-config-drupal": "5.0.2", - "npx": "10.2.2" + "eslint-plugin-yml": "1.5.0", + "eslint-config-drupal": "5.0.2" } } From ffc899f59f79dbf48d0dafd494b242780bb96ebc Mon Sep 17 00:00:00 2001 From: Jes Constantine Date: Thu, 13 Jul 2023 10:56:28 -0600 Subject: [PATCH 16/23] Remove legacy ddev web container command for npx We were able to remove the node dependency in favor of just using yarn ++ --- .ddev/commands/web/npx | 7 ------- 1 file changed, 7 deletions(-) delete mode 100755 .ddev/commands/web/npx diff --git a/.ddev/commands/web/npx b/.ddev/commands/web/npx deleted file mode 100755 index 4cdd2aa..0000000 --- a/.ddev/commands/web/npx +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -## Description: Run npx which executes node binaries. -## Usage: npx [node binary] [options] -## Example: "npx eslint --ext .js docroot/modules/custom" - -node_modules/.bin/npx "$@" From b14ca24b23175f332bfe49284de451041f46c48f Mon Sep 17 00:00:00 2001 From: Jes Constantine Date: Thu, 13 Jul 2023 11:29:57 -0600 Subject: [PATCH 17/23] Remove reference to npm as a dependency since it's in ddev already --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 90742dd..c75fff3 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,6 @@ The development dependencies are: The dependencies for linting custom javascript are: * [Node](https://nodejs.org/en/) version 18.x.x or greater. -* [npm](https://www.npmjs.com/get-npm) version 9.x.x or greater. Once you have your dependencies installed, setting up this skeleton will take at least another hour, depending on your internet connection. From e7a2d23b76a4c3203b9ffe220b60e2041acd58d8 Mon Sep 17 00:00:00 2001 From: Jes Constantine Date: Thu, 13 Jul 2023 11:31:35 -0600 Subject: [PATCH 18/23] Add link to package.json name convention requirements --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c75fff3..3a4fa4b 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,7 @@ Update the `composer.json`: Update the `package.json`: -* Change the `name` from `palantirnet--drupal-skeleton` to `palantirnet--PROJECTNAME` +* Change the `name` from `palantirnet--drupal-skeleton` to `palantirnet--PROJECTNAME` (see [package.json name requirements](https://docs.npmjs.com/cli/v8/configuring-npm/package-json#name)) * Update the `description` with a brief description of your project. ### Configure your ddev development environment From 2cb502beb50ab0d10c319dc370dfd55456d88322 Mon Sep 17 00:00:00 2001 From: Jes Constantine Date: Thu, 13 Jul 2023 11:33:07 -0600 Subject: [PATCH 19/23] Try removing eslint yaml plugin from project root package.json --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 3943043..c9359c3 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,6 @@ "version": "0.0.0", "devDependencies": { "eslint": "8.39.0", - "eslint-plugin-yml": "1.5.0", "eslint-config-drupal": "5.0.2" } } From ca06fcbe7fc7c923a98626619c806d14f43de66b Mon Sep 17 00:00:00 2001 From: Jes Constantine Date: Thu, 13 Jul 2023 11:44:53 -0600 Subject: [PATCH 20/23] Reference eslint configuration in the-build --- docs/general/drupal_development.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/general/drupal_development.md b/docs/general/drupal_development.md index 7c968d4..a02fb42 100644 --- a/docs/general/drupal_development.md +++ b/docs/general/drupal_development.md @@ -111,5 +111,7 @@ This project uses [eslint](https://eslint.org/docs/latest/use/) to check custom If you'd like to handle your custom module's linting independently, add your module directory to the `/.eslintignore` file and add a command to additionally lint your js to the `code-review` phing target in `build.xml`. +Note: There is [some default configuration for eslint](https://github.com/palantirnet/the-build/pull/223/files#diff-339072f52845d316656969cbac2815305c0ccea0ce9de789ba73d78849336067)) that you can override in your project configuration for `the-build` + ---- Copyright 2023 Palantir.net, Inc. From 893b05484c37b181d77ae4bb25d6f9fc25debd31 Mon Sep 17 00:00:00 2001 From: Jes Constantine Date: Thu, 13 Jul 2023 11:58:17 -0600 Subject: [PATCH 21/23] Remove node as a project dependency - it ships on ddev. --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index 3a4fa4b..13dbe24 100644 --- a/README.md +++ b/README.md @@ -21,10 +21,6 @@ The development dependencies are: * [DDev Local](https://ddev.com/ddev-local/) * ddev can be installed with [homebrew](https://brew.sh/): `brew install ddev` -The dependencies for linting custom javascript are: - -* [Node](https://nodejs.org/en/) version 18.x.x or greater. - Once you have your dependencies installed, setting up this skeleton will take at least another hour, depending on your internet connection. Some of the commands below will prompt you for a response, with the default answer in brackets. For this quick start, hit return to accept each default answer: From 24d75fda65f45967414c0f3c6897ac5fab91a4b5 Mon Sep 17 00:00:00 2001 From: Ken Rickard Date: Wed, 16 Aug 2023 16:18:32 -0400 Subject: [PATCH 22/23] Use php 8.1.18 --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d573f65..6dae06a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,7 @@ jobs: build: working_directory: ~/drupal-skeleton docker: - - image: cimg/php:8.1-browsers + - image: cimg/php:8.1.18-browsers - image: cimg/mysql:5.7 command: --max_allowed_packet=16M environment: From 19885d8ca663722b6cde1adb6dd1f0bef36cfd00 Mon Sep 17 00:00:00 2001 From: Ken Rickard Date: Wed, 16 Aug 2023 16:22:29 -0400 Subject: [PATCH 23/23] Revert "Use php 8.1.18" This reverts commit 24d75fda65f45967414c0f3c6897ac5fab91a4b5. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f4ba5ee..a033315 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,7 @@ jobs: build: working_directory: ~/drupal-skeleton docker: - - image: cimg/php:8.1.18-browsers + - image: cimg/php:8.1-browsers - image: cimg/mysql:5.7 command: --max_allowed_packet=16M environment: