Skip to content

Instantly share code, notes, and snippets.

@mamachanko
Created March 21, 2020 10:57
Show Gist options
  • Save mamachanko/6b5250c591e6d230a3b2258b9f31d2ca to your computer and use it in GitHub Desktop.
Save mamachanko/6b5250c591e6d230a3b2258b9f31d2ca to your computer and use it in GitHub Desktop.
isomorphic-git demo
<!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