Create drupal-project with --no-install option:
composer create-project drupal-composer/drupal-project:8.x-dev my_site_name_dir --no-interaction --no-install
Change directories to my_site_name_dir and edit the version contraints in the composer.json file:
"require": {
...
"drupal/core": "8.6.*",
...
},
Also for
"require-dev": {
"webflo/drupal-core-require-dev": "8.6.*"
},
webflo/drupal-core-require-dev provides the require-dev dependencies of drupal/core as a standalone package. It follows the same release cycle and versioning scheme as Drupal core. You should use the same version constraint for it as you use for Drupal core.
Run composer install
Warning
Warning
Since answering the question the de-facto standard for installing Drupal via composer has changed from drupal-composer/drupal-project to drupal/recommended-project. Now you can append the version directly to the package. See this answer How can I install a specific core version?Vinod Singh's answer.