Created
March 21, 2020 10:57
-
-
Save mamachanko/6b5250c591e6d230a3b2258b9f31d2ca to your computer and use it in GitHub Desktop.
isomorphic-git demo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>isomorphic-git demo</title> | |
</head> | |
<body> | |
<h1>Hello, this is a demo of isomorphic-git.</h1> | |
<script src="https://unpkg.com/@isomorphic-git/lightning-fs"></script> | |
<script src="https://unpkg.com/isomorphic-git"></script> | |
<script type="module"> | |
import http from 'https://unpkg.com/isomorphic-git@beta/http/web/index.js'; | |
const fs = new LightningFS('fs'); | |
const dir = '/test-clone'; | |
git | |
.clone({ | |
fs, | |
http, | |
dir, | |
url: 'https://github.com/isomorphic-git/lightning-fs', | |
corsProxy: 'https://cors.isomorphic-git.org', | |
}) | |
.then(console.log); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment