https://github.com/markerikson/git-js-repo-history-conversion-utils
Scripts for rewriting Git repo history and transforming JS source to ES6+
https://github.com/markerikson/git-js-repo-history-conversion-utils
Last synced: 9 months ago
JSON representation
Scripts for rewriting Git repo history and transforming JS source to ES6+
- Host: GitHub
- URL: https://github.com/markerikson/git-js-repo-history-conversion-utils
- Owner: markerikson
- Created: 2018-11-17T22:17:47.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-17T22:53:54.000Z (over 7 years ago)
- Last Synced: 2025-05-12T16:47:20.232Z (about 1 year ago)
- Language: Python
- Size: 50.8 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Git and JS History Conversion Tools
These tools accompany my blog post [Rewriting Your Git History and JS Source for Fun and Profit](https://blog.isquaredsoftware.com/2018/11/git-js-history-rewriting/).
They are a slightly sanitized version of the scripts that I used to rewrite our Git repository, by converting all AMD/ES5 code to ES6 module syntax, and auto-formatting all JS and Python source throughout the entire history of the repository.
If you actually wanted to use this:
**Setup**
1. Tweak paths as needed:
1. Edit `repoFilterUtils.py` to define the source repo and output repo paths
2. Edit `js-codemods/transformJSFile.js` and fix the path to a temp folder for writing errors to disk
2. Use `yarn` to install the JS dependencies under `js-codemods/`
3. Install Black and Requests into your system's Python3 location
**Running**
1. Run `node js-codemods/jsTransformServer` in a separate shell.
2. Run `python3 cloneAndProcessRepo.py` to kick this off.