async function copyFiles() {

	// Remove any extraneous files before copy
	await rimraf( [
		`${ distRepoFolder }/dist`,
		`${ distRepoFolder }/dist-module`,
		`${ distRepoFolder }/src`
	] );

	// Copy all files
	await Promise.all(
		files.map( function( path ) {
			console.log( `Copying ${ path }...` );
			return exec( `cp -rf ${ path } ${ distRepoFolder }/${ path }` );
		} )
	);

	// Remove the wrapper from the dist repo
	await rimraf( [
		`${ distRepoFolder }/src/wrapper.js`
	] );

	// Set the version in src/core.js
	const core = await readFile( `${ distRepoFolder }/src/core.js`, "utf8" );
	await writeFile(
		`${ distRepoFolder }/src/core.js`,
		core.replace( /@VERSION/g, version )
	);

	// Write generated README
	console.log( "Generating README.md..." );
	const readme = await generateReadme();
	await writeFile( `${ distRepoFolder }/README.md`, readme );

	// Write generated Bower file
	console.log( "Generating bower.json..." );
	const bower = await generateBower();
	await writeFile( `${ distRepoFolder }/bower.json`, bower );

	// Write simplified package.json
	console.log( "Writing package.json..." );
	await writeFile(
		`${ distRepoFolder }/package.json`,
		JSON.stringify(
			{
				...pkg,
				scripts: undefined,
				dependencies: undefined,
				devDependencies: undefined,
				commitplease: undefined
			},
			null,
			2

		// Add final newline
		) + "\n"
	);

	console.log( "Files copied to dist repo." );
}
Copy necessary files over to the dist repo