scripts/new.js
function updateDemo(component) {
  const source = path.join(packages, component, 'demo');
  const destination = path.join(demo, component);

  ncp(source, destination, error => {
    if (error) {
      console.log(chalk.red('error'), error);
    } else {
      rimraf(source, () => {
        console.log(chalk.green('success'), 'Updated component demo');
        execSync(`yarn build --scope @zendeskgarden/css-${component}`);
        linkCss(component);
        execSync(`yarn start --open=${component}`);
      });
    }
  });
}
function updateDemo(component) {
  const source = path.join(packages, component, 'demo');
  const destination = path.join(demo, component);

  ncp(source, destination, error => {
    if (error) {
      console.log(chalk.red('error'), error);
    } else {
      rimraf(source, () => {
        console.log(chalk.green('success'), 'Updated component demo');
        execSync(`yarn build --scope @zendeskgarden/css-${component}`);
        linkCss(component);
        execSync(`yarn start --open=${component}`);
      });
    }
  });
}
function updateDemo ( component ) { const source = path . join ( packages , component , 'demo' ) ; const destination = path . join ( demo , component ) ; ncp ( source , destination , error => { if ( error ) { console . log ( chalk . red ( 'error' ) , error ) ; } else { rimraf ( source , ( ) => { console . log ( chalk . green ( 'success' ) , 'Updated component demo' ) ; execSync ( ` ${ component } ` ) ; linkCss ( component ) ; execSync ( ` ${ component } ` ) ; } ) ; } } ) ; }
Update the HTML page demo for the given component.

@param {String} component The name of the component to update.
Update the HTML page demo for the given component .