message: prettier (automatic - sorry) plus fix path to types L36
diff: @@ -4,35 +4,46 @@ const glob = require('glob');
  function copyTypings(from, to) {
  const files = glob.sync('**/*.d.ts', { cwd: from });
  - const cmds = files.map(file => fse.copy(path.resolve(from, file), path.resolve(to, file)));
  + const cmds = files.map(file =>
  + fse.copy(path.resolve(from, file), path.resolve(to, file))
  + );
  return Promise.all(cmds);
  }
  function copyReadme() {
  - return fse.copyFile(path.resolve(__dirname, '..', 'README.md'), path.resolve(__dirname, 'build', 'README.md'));
  + return fse.copyFile(
  + path.resolve(__dirname, '..', 'README.md'),
  + path.resolve(__dirname, 'build', 'README.md')
  + );
  }
  function createPackageFile() {
  - return new Promise((resolve) => {
  - fse.readFile(path.resolve(__dirname, 'package.json'), 'utf8', (err, data) => {
  + return new Promise(resolve => {
  + fse.readFile(
  + path.resolve(__dirname, 'package.json'),
  + 'utf8',
  + (err, data) => {
  if (err) {
  throw err;
  }
  resolve(data);
  - });
  + }
  + );
  })
  .then(data => JSON.parse(data))
  - .then((packageData) => {
  + .then(packageData => {
  + const { types, ...other } = packageData;
  const newPackage = {
  - ...packageData,
  + ...other,
  + types: 'index.d.ts',
  private: false,
  };
  - return new Promise((resolve) => {
  + return new Promise(resolve => {
  const buildPath = path.resolve(__dirname, 'build', 'package.json');
  const data = JSON.stringify(newPackage, null, 2);
  - fse.writeFile(buildPath, data, (err) => {
  + fse.writeFile(buildPath, data, err => {
  if (err) throw err;
  console.log(`Created package.json in ${buildPath}`);
  resolve();
  @@ -42,5 +53,10 @@ function createPackageFile() {
  }
  createPackageFile()
  - .then(() => copyTypings(path.resolve(__dirname, 'src'), path.resolve(__dirname, 'build')))
  + .then(() =>
  + copyTypings(
  + path.resolve(__dirname, 'src'),
  + path.resolve(__dirname, 'build')
  + )
  + )
  .then(() => copyReadme());
  