Skip to content

Commit

Permalink
feat: gun-es
Browse files Browse the repository at this point in the history
  • Loading branch information
davay42 committed Apr 26, 2023
1 parent 89f2430 commit 5560b0c
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 17 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,9 @@ jobs:
continue-on-error: true
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish gun-es
run: cd gun-es && npm publish --provenance --access public
continue-on-error: true
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
18 changes: 18 additions & 0 deletions gun-es/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>

<head>
<title>GUN-ES test</title>
<script type="module" async>
import {Gun, SEA} from './dist/gun-es.js';
const pair = await SEA.pair();
const gun = Gun();
gun.user().auth(pair, (p) => console.log(gun.user().is));
</script>
</head>

<body>
<h1>Gun Test</h1>
</body>

</html>
11 changes: 10 additions & 1 deletion gun-es/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
import Gun from 'gun/gun';
import Gun from 'gun';

const window = {
crypto: self.crypto,
TextEncoder: self.TextEncoder,
TextDecoder: self.TextDecoder,
WebSocket: self.WebSocket,
Gun,
}

export { Gun };
export { default as SEA } from 'gun/sea.js';

12 changes: 6 additions & 6 deletions gun-es/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions gun-es/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "gun-es",
"private": true,
"name": "@gun-vue/gun-es",
"version": "0.1.1239",
"type": "module",
"scripts": {
Expand All @@ -9,9 +8,9 @@
"preview": "vite preview"
},
"devDependencies": {
"vite": "^4.3.2"
"vite": "4.3.2"
},
"dependencies": {
"gun": "^0.2020.1239"
"gun": "0.2020.1239"
}
}
}
5 changes: 0 additions & 5 deletions gun-es/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ export default defineConfig({
define: {
'process.env': {},
},
resolve: {
alias: {
vue: 'vue/dist/vue.esm-bundler.js',
},
},
optimizeDeps: {
include: [
'gun',
Expand Down

0 comments on commit 5560b0c

Please sign in to comment.