const yargs = require('yargs');
const execa = require('execa');
const fs = require('fs-extra');
const path = require('path');

const rootDir = process.cwd();

let argv = yargs
.usage(
  '$0 <from> <to> '
)
.command({
  command: '*',
  handler: async argv => {
    console.log(argv);
    const templatePath = path.join(rootDir, `examples/${argv._[0]}`);
    const projectPath = path.join(rootDir, `examples/${argv._[1]}`);
    fs.copy(templatePath, projectPath)
    .then(function() {
    })
  },
})
.help().argv;

@@ -464,16 +464,22 @@
   .then(
+async 
 function
@@ -483,16 +483,623 @@
 ion() %7B%0A
+          const packageJsonData = JSON.parse(%0A            await fs.readFile(path.join(projectPath, 'package.json'))%0A          );%0A          packageJsonData.name = %60razzle-examples-$%7Bargv._%5B1%5D%7D%60%0A          const jsonString = JSON.stringify(packageJsonData, null, '  ') + '%5Cn';%0A            if (jsonString) %7B%0A              try %7B%0A                fs.writeFileSync(path.join(projectPath, 'package.json'), jsonString);%0A              %7D catch %7B%0A                console.log(%60failed to write json $%7Bitem%7D%60);%0A              %7D%0A            %7D else %7B%0A              console.log(%60not writing empty json $%7Bitem%7D%60);%0A            %7D%0A
     %7D)%0A 

set name in example