message: Minimize package.json in the build
diff: const path = require('path');
  const fse = require('fs-extra');
  -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))
  - );
  - return Promise.all(cmds);
  -}
  function copyReadme() {
  return fse.copyFile(
  @@ -33,11 +24,22 @@ function createPackageFile() {
  })
  .then(data => JSON.parse(data))
  .then(packageData => {
  - const { types, ...other } = packageData;
  + // cleanup produced package
  + const {
  + main,
  + devDependencies,
  + jest,
  + husky,
  + 'lint-staged': ls,
  + scripts: { postinstall },
  + ...other
  + } = packageData;
  const newPackage = {
  ...other,
  - types: 'index.d.ts',
  private: false,
  + scripts: {
  + postinstall,
  + },
  };
  return new Promise(resolve => {
  @@ -52,11 +54,4 @@ function createPackageFile() {
  });
  }
  -createPackageFile()
  - .then(() =>
  - copyTypings(
  - path.resolve(__dirname, 'src'),
  - path.resolve(__dirname, 'build')
  - )
  - )
  - .then(() => copyReadme());
  +createPackageFile().then(() => copyReadme());
  