decaffeinate.sh 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. set -ex
  2. curl -o .eslintrc https://raw.githubusercontent.com/sharelatex/web-sharelatex/master/.eslintrc
  3. curl -o .prettierrc https://raw.githubusercontent.com/sharelatex/web-sharelatex/master/.prettierrc
  4. git add .
  5. git commit -m "Decaffeinate: add eslint and prettier rc files"
  6. npx bulk-decaffeinate convert --dir app/coffee
  7. npx bulk-decaffeinate clean
  8. git mv app/coffee app/js
  9. git commit -m "Rename app/coffee dir to app/js"
  10. npx prettier-eslint 'app/js/**/*.js' --write
  11. git add .
  12. git commit -m "Prettier: convert app/js decaffeinated files to Prettier format"
  13. npx bulk-decaffeinate convert --dir test/acceptance/coffee
  14. npx bulk-decaffeinate clean
  15. git mv test/acceptance/coffee test/acceptance/js
  16. git commit -m "Rename test/acceptance/coffee to test/acceptance/js"
  17. npx prettier-eslint 'test/acceptance/js/**/*.js' --write
  18. git add .
  19. git commit -m "Prettier: convert test/acceptance decaffeinated files to Prettier format"
  20. git mv app.coffee app.js
  21. git mv Gruntfile.coffee Gruntfile.js
  22. git mv config/settings.defaults.coffee config/settings.defaults.js
  23. git commit -m "Rename individual coffee files to js files"
  24. decaffeinate app.js
  25. decaffeinate Gruntfile.js
  26. decaffeinate config/settings.defaults.js
  27. git add .
  28. git commit -m "Decaffeinate: convert individual files to js"
  29. npx prettier-eslint 'app.js' 'Gruntfile.js' 'config/settings.defaults.js' --write
  30. git add .
  31. git commit -m "Prettier: convert individual decaffeinated files to Prettier format"
  32. echo "done"