PHP code example of drupal / core-composer-scaffold
1. Go to this page and download the library: Download drupal/core-composer-scaffold library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once ('vendor/autoload.php' );
drupal / core-composer-scaffold example snippets
{
"name" : "service-provider/d8-scaffold-files" ,
"extra" : {
"drupal-scaffold" : {
"file-mapping" : {
"[web-root]/sites/default/settings.php" : {
"mode" : "replace" ,
"path" : "assets/sites/default/settings.php" ,
"overwrite" : false
}
}
}
}
}
"file-mapping" : {
"[web-root]/sites/default/default.settings.php" : {
"mode" : "replace" ,
"path" : "assets/sites/default/default.settings.php" ,
"overwrite" : true
},
"[web-root]/sites/default/settings.php" : {
"mode" : "replace" ,
"path" : "assets/sites/default/settings.php" ,
"overwrite" : false
},
"[web-root]/robots.txt" : {
"mode" : "append" ,
"prepend" : "assets/robots-prequel.txt" ,
"append" : "assets/robots-append.txt"
},
"[web-root]/.htaccess" : {
"mode" : "skip" ,
}
}
"file-mapping" : {
"[web-root]/sites/default/default.settings.php" : "assets/sites/default/default.settings.php" ,
"[web-root]/sites/default/settings.php" : {
"path" : "assets/sites/default/settings.php" ,
"overwrite" : false
},
"[web-root]/robots.txt" : {
"prepend" : "assets/robots-prequel.txt" ,
"append" : "assets/robots-append.txt"
},
"[web-root]/.htaccess" : false
}
"file-mapping" : {
"[web-root]/sites/default/settings-custom.php" : "assets/settings-custom.php" ,
"[web-root]/sites/default/settings.php" : {
"append" : "assets/
{
"name" : "drupal/assets" ,
"extra" : {
"drupal-scaffold" : {
"file-mapping" : {
"[web-root]/.csslintrc" : "assets/.csslintrc" ,
"[web-root]/.editorconfig" : "assets/.editorconfig" ,
"[web-root]/.eslintignore" : "assets/.eslintignore" ,
"[web-root]/.eslintrc.json" : "assets/.eslintrc.json" ,
"[web-root]/.gitattributes" : "assets/.gitattributes" ,
"[web-root]/.ht.router.php" : "assets/.ht.router.php" ,
"[web-root]/.htaccess" : "assets/.htaccess" ,
"[web-root]/sites/default/default.services.yml" : "assets/default.services.yml" ,
"[web-root]/sites/default/default.settings.php" : "assets/default.settings.php" ,
"[web-root]/sites/example.settings.local.php" : "assets/example.settings.local.php" ,
"[web-root]/sites/example.sites.php" : "assets/example.sites.php" ,
"[web-root]/index.php" : "assets/index.php" ,
"[web-root]/robots.txt" : "assets/robots.txt" ,
"[web-root]/update.php" : "assets/update.php" ,
}
}
}
}
{
"name" : "service-provider/d8-scaffold-files" ,
"extra" : {
"drupal-scaffold" : {
"file-mapping" : {
"[web-root]/sites/default/settings.php" : "assets/sites/default/settings.php"
}
}
}
}