GitLapse
Time lapse the design of your project. Will generate screenshots within a given range of commits, and run your setup script between each one to ensure the dependencies are always inline.
Install
npm install -g gitlapse
## Example usage
Create a config file called gitlapse.json
similar to the following in the project's directory you want to create the time lapse for:
{
"name": "GitLapse project",
"repo": "./",
"uri": "http://localhost:3000",
"output": "dist",
"scripts": {
"setup": "scripts/setup.sh",
"server": "scripts/server.sh"
},
"window": {
"width": 1280,
"height": 800
}
}
Once you've done that, you can hit the following (assuming your gitlapse.json
is in the current working directory):
gitlapse <oldest-revision>..<newest-revision> [steps]
# eg gitlapse e7848c423ffb4807846fc9e0cde9fbaf23578621..dbf4ed3c4c67ac1a9961be5d329f4acaac9505de
# Use --help to get more instructions
gitlapse --help
Options
Option | Default Value | Description |
---|---|---|
start-revision |
tag or commit sha |
The SHA of the first revision you want to capture. |
end-revision |
tag or commit sha |
TThe SHA of the last revision you want to capture. |
steps |
1 |
The number of commits to 'jump' by after each screenshot. If your project has been around for a while, you'll want to bump this up. Essentially this is the resolution of the time lapse. |
repo |
./ |
The relative path to the repository you're working with. Usually this'll just be the current working directory. |
setup |
config/setup.sh |
The relative path to your setup script. This will run after each revision is checked out. Typically this is bash script that will clear your `node_modules` directory and then run `npm install` or `bundle` afterwards. |
server |
config/server.sh |
The relative path to your 'start server' script. This will run after each revision is checked out. Put the command in this file to start your server. E.g `node app.js` or `rails s`. |
url |
http://localhost:8080 |
The URL for where the local server will be running. This is what will be viewed for the screenshot captures. |
output |
./dist |
The relative directory for where you want the time lapse to be output. |
width |
1280 |
The width of the browser window to capture the screenshot at. |
height |
800 |
The height of the browser window to capture the screenshot at. |
silent |
false |
Disable console logging during generation. |