files missing in web/ folder when using composer.lock file I have run into an unexpected problem with a fresh install of drupal 8.

Initial setup

$ git clone https://github.com/drupal-composer/drupal-project dp
$ cd dp
$ composer install


This works fine, installs everything. I now repeat the same thing, and use the composer.lock file from the above. 

$ git clone https://github.com/drupal-composer/drupal-project dp2
$ cp dp/composer.lock dp2/
$ cd dp2
$ composer install


This time, however, the web/folder just has folders in it, no files. In fact, a diff between the two folders shows a number of missing files including in sites and sites/default.

I thought the composer.lock file was used to simply lock the versions of the modules down.

What am I missing here?
After some investigation, I found the culprit. The composer project uses drupal scaffold to place these files. However, this does not seem to be getting executed when the .lock file is already in place when you do the composer install

To resolve this, it was as simple as running the following command

$ composer drupal-scaffold