visionm Posted Monday at 08:31 PM Posted Monday at 08:31 PM Hi. I am new to drupal and I am trying to find how to write a composer.json file for this. I finally asked gpt4 and it gave me this (below). I just wanted someone to look at it to be sure I would not break something with this. The main question I have though is which is the web directory or would it just be public/ ? { "name": "example/drupal-project", "description": "A Drupal 11 project setup using Composer.", "type": "project", "license": "GPL-2.0-or-later", "require": { "drupal/core-recommended": "^11.0", "drupal/core-composer-scaffold": "^11.0", "drupal/core-project-message": "^11.0", "composer/installers": "^2.0", "cweagans/composer-patches": "^1.7" }, "require-dev": { "drupal/devel": "^5.1" }, "conflict": { "drupal/drupal": "*" }, "minimum-stability": "stable", "prefer-stable": true, "config": { "preferred-install": "dist", "sort-packages": true, "optimize-autoloader": true }, "extra": { "drupal-scaffold": { "locations": { "web-root": "httpdocs/public" } }, "installer-paths": { "httpdocs/public/core": ["type:drupal-core"], "httpdocs/public/libraries/{$name}": ["type:drupal-library"], "httpdocs/public/modules/contrib/{$name}": ["type:drupal-module"], "httpdocs/public/profiles/contrib/{$name}": ["type:drupal-profile"], "httpdocs/public/themes/contrib/{$name}": ["type:drupal-theme"], "drush/Commands/contrib/{$name}": ["type:drupal-drush"] }, "enable-patching": true }, "scripts": { "post-install-cmd": [ "Drupal\\Core\\Composer\\Composer::vendorTestCodeCleanup", "Drupal\\Core\\Composer\\Composer::ensureHtaccess" ], "post-update-cmd": [ "Drupal\\Core\\Composer\\Composer::vendorTestCodeCleanup", "Drupal\\Core\\Composer\\Composer::ensureHtaccess" ] } }
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now