Skip to content

Commit

Permalink
Fix: remove prism because it intermittently breaks in prod and we don…
Browse files Browse the repository at this point in the history
…'t need it
  • Loading branch information
avivash committed Aug 10, 2023
1 parent 8c931c6 commit 9d8af5b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 38 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,8 @@ jobs:
node-version: '16'
- name: 📦 Install packages
run: npm install
- name: Make .env file
uses: SpicyPizza/[email protected]
with:
envkey_PUBLIC_WEB3_STORAGE_KEY: ${{ secrets.PUBLIC_WEB3_STORAGE_KEY }}
file_name: .env
fail_on_empty: true
sort_keys: false
- name: 🏗 Build assets
run: npm run build
run: PUBLIC_WEB3_STORAGE_KEY=${{ secrets.PUBLIC_WEB3_STORAGE_KEY }} npm run build
- name: 🚀 Publish to production
uses: fission-suite/publish-action@v1
with:
Expand Down
14 changes: 0 additions & 14 deletions package-lock.json

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

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
"@web3modal/html": "^2.7.0",
"clipboard-copy": "^4.0.1",
"ethers": "^5.7.2",
"prismjs": "^1.29.0",
"uint8arrays": "^4.0.2",
"viem": "^1.4.2",
"web3.storage": "^4.5.5"
Expand Down
21 changes: 6 additions & 15 deletions src/routes/join/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import clipboardCopy from 'clipboard-copy'
import { onDestroy } from 'svelte'
import { writable } from 'svelte/store'
import Prism from 'prismjs'
import { parseEther } from 'viem'
import { filecoinCalibration } from 'viem/chains'
import { Web3Storage } from 'web3.storage'
Expand Down Expand Up @@ -364,29 +363,21 @@
>
<div slot="main">
{#if deployedAddress}
{@const html = Prism.highlight(
`\n<script src="fund-ring-widget.js"><\/script>\n\n<fund-ring-widget\n contractAddress="${deployedAddress}"\n title="Help fund ${$projectDetails.name}!"\n bodyCopy="A brief description"\n\/>`,
Prism.languages.javascript,
'javascript'
)}
{@const html = `\n<script src="fund-ring-widget.js"><\/script>\n\n<fund-ring-widget\n contractAddress="${deployedAddress}"\n title="Help fund ${$projectDetails.name}!"\n bodyCopy="A brief description"\n\/>`}
<pre
class="p-2.5 mb-4 border border-odd-gray-500 bg-odd-yellow-100 text-body-sm overflow-x-scroll">
<code class="language-html text-left">
{@html html}
{html}
</code>
</pre>
{:else}
{@const html = Prism.highlight(
`\n<script src="fund-ring-widget.js"><\/script>\n\n<fund-ring-widget\n contractAddress="<CONTRACT_ADDRESS>"\n title="Help fund ${
$projectDetails.name ?? '<PROJECT_NAME>'
}!"\n bodyCopy="A brief description"\n\/>`,
Prism.languages.javascript,
'javascript'
)}
{@const html = `\n<script src="fund-ring-widget.js"><\/script>\n\n<fund-ring-widget\n contractAddress="<CONTRACT_ADDRESS>"\n title="Help fund ${
$projectDetails.name ?? '<PROJECT_NAME>'
}!"\n bodyCopy="A brief description"\n\/>`}
<pre
class="p-2.5 mb-4 border border-odd-gray-500 bg-odd-yellow-100 text-body-sm overflow-x-scroll">
<code class="language-html text-left">
{@html html}
{html}
</code>
</pre>
{/if}
Expand Down

0 comments on commit 9d8af5b

Please sign in to comment.