packages/create-slate-theme/create-slate-theme.js
function copyFromDir(starter, root) {
  if (!fs.existsSync(starter)) {
    throw new Error(`starter ${starter} doesn't exist`);
  }

  // Chmod with 755.
  // 493 = parseInt('755', 8)
  return fs.mkdirp(root, {mode: 493}).then(() => {
    console.log(
      `Creating new theme from local starter: ${chalk.green(starter)}`,
    );
    return fs.copy(starter, root, {
      filter: (file) =>
        !/^\.(git|hg)$/.test(path.basename(file)) && !/node_modules/.test(file),
    });
  });
}
function copyFromDir(starter, root) {
  if (!fs.existsSync(starter)) {
    throw new Error(`starter ${starter} doesn't exist`);
  }

  // Chmod with 755.
  // 493 = parseInt('755', 8)
  return fs.mkdirp(root, {mode: 493}).then(() => {
    console.log(
      `Creating new theme from local starter: ${chalk.green(starter)}`,
    );
    return fs.copy(starter, root, {
      filter: (file) =>
        !/^\.(git|hg)$/.test(path.basename(file)) && !/node_modules/.test(file),
    });
  });
}
function copyFromDir ( starter , root ) { if ( ! fs . existsSync ( starter ) ) { throw new Error ( ` ${ starter } ` ) ; } // Chmod with 755. // 493 = parseInt('755', 8) return fs . mkdirp ( root , { mode : 493 } ) . then ( ( ) => { console . log ( ` ${ chalk . green ( starter ) } ` , ) ; return fs . copy ( starter , root , { filter : ( file ) => ! / ^\.(git|hg)$ / . test ( path . basename ( file ) ) && ! / node_modules / . test ( file ) , } ) ; } ) ; }
Copy starter from file system.
Copy starter from file system .