build-chokidar.sh 648 B

123456789101112131415161718192021222324252627282930
  1. #!/bin/sh
  2. set -e
  3. CHOKIDAR_VERSION=2.1.8
  4. rm -rf dist chokidar node_modules
  5. mkdir chokidar
  6. npm pack "chokidar@$CHOKIDAR_VERSION"
  7. tar zxvfC chokidar-$CHOKIDAR_VERSION.tgz chokidar --strip 1 package
  8. rm chokidar-$CHOKIDAR_VERSION.tgz
  9. node -e "
  10. const pkg = require('./package.json');
  11. pkg.devDependencies = {
  12. ...require('./chokidar/package.json').dependencies,
  13. 'glob-parent': '^5.1.2',
  14. 'webpack': '^5.53.0',
  15. 'webpack-cli': '^4.8.0'
  16. };
  17. pkg.dependencies = {};
  18. fs.writeFileSync('./package.json', JSON.stringify(pkg, null, 2) + '\n');
  19. "
  20. yarn && yarn bundle
  21. cp chokidar/types/index.d.ts ./types.d.ts