-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add index.html for better preview (#248)
* feat: add index.html for better preview * chore: remove unused deps
- Loading branch information
Showing
8 changed files
with
83 additions
and
165 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>PancakeSwap Token Lists</title> | ||
</head> | ||
|
||
<body> | ||
|
||
<script type="module"> | ||
const LISTS = {"pancakeswap-aptos":{"name":"PancakeSwap Aptos","keywords":["pancakeswap","aptos"],"logoURI":"https://pancakeswap.finance/logo.png","sort":true,"schema":"aptos","test":{"skipLogo":true,"aptos":true}},"pancakeswap-zksync-default":{"name":"PancakeSwap Zksync Default","keywords":["pancakeswap","default","zksync"],"logoURI":"https://pancakeswap.finance/logo.png","sort":false},"pancakeswap-linea-default":{"name":"PancakeSwap Linea Default","keywords":["pancakeswap","default","linea"],"logoURI":"https://pancakeswap.finance/logo.png","sort":false},"pancakeswap-base-default":{"name":"PancakeSwap Base Default","keywords":["pancakeswap","default","base"],"logoURI":"https://pancakeswap.finance/logo.png","sort":false},"pancakeswap-polygon-zkevm-default":{"name":"PancakeSwap Zkevm Default","keywords":["pancakeswap","default","polygon","zkevm"],"logoURI":"https://pancakeswap.finance/logo.png","sort":false},"pancakeswap-arbitrum-default":{"name":"PancakeSwap Arbitrum Default","keywords":["pancakeswap","default","arbitrum"],"logoURI":"https://pancakeswap.finance/logo.png","sort":false},"pancakeswap-eth-default":{"name":"PancakeSwap Ethereum Default","keywords":["pancakeswap","default","ethereum"],"logoURI":"https://pancakeswap.finance/logo.png","sort":false},"pancakeswap-eth-mm":{"name":"PancakeSwap Ethereum MM","keywords":["pancakeswap","mm","ethereum"],"logoURI":"https://pancakeswap.finance/logo.png","sort":false},"pancakeswap-bnb-mm":{"name":"PancakeSwap BNB Chain MM","keywords":["pancakeswap","mm","bnb"],"logoURI":"https://pancakeswap.finance/logo.png","sort":false},"pancakeswap-default":{"name":"PancakeSwap Default","keywords":["pancakeswap","default"],"logoURI":"https://pancakeswap.finance/logo.png","sort":false},"pancakeswap-extended":{"name":"PancakeSwap Extended","keywords":["pancakeswap","extended"],"logoURI":"https://pancakeswap.finance/logo.png","sort":true},"pancakeswap-top-100":{"name":"PancakeSwap Top 100","keywords":["pancakeswap","top 100"],"logoURI":"https://pancakeswap.finance/logo.png","sort":true},"pancakeswap-top-15":{"name":"PancakeSwap Top 15","keywords":["pancakeswap","top 15"],"logoURI":"https://pancakeswap.finance/logo.png","sort":true},"coingecko":{"name":"CoinGecko","keywords":["defi"],"logoURI":"https://tokens.pancakeswap.finance/images/projects/coingecko.png","sort":true,"test":{"skipLogo":true,"aptos":false}},"cmc":{"name":"CoinMarketCap","keywords":["defi"],"logoURI":"https://ipfs.io/ipfs/QmQAGtNJ2rSGpnP6dh6PPKNSmZL8RTZXmgFwgTdy5Nz5mx","sort":true,"test":{"skipLogo":true,"aptos":false}},"pancakeswap-mini":{"name":"PancakeSwap Mini","keywords":["pancakeswap","binance","mini program","mini"],"logoURI":"https://pancakeswap.finance/logo.png","sort":true},"pancakeswap-mini-extended":{"name":"PancakeSwap Mini Ext","keywords":["pancakeswap","binance","mini program","mini","extended"],"logoURI":"https://pancakeswap.finance/logo.png","sort":true},"pancakeswap-onramp":{"name":"PancakeSwap Onramp","keywords":["pancakeswap","onramp"],"logoURI":"https://pancakeswap.finance/logo.png","sort":true}}; | ||
|
||
const lis = Object.keys(LISTS).map((list) => { | ||
return ` | ||
<li> | ||
<a href="/${list}.json">${list}</a> | ||
</li> | ||
<br /> | ||
` | ||
}); | ||
const ul = document.createElement('ul'); | ||
ul.innerHTML = lis.join(''); | ||
document.body.appendChild(ul); | ||
</script> | ||
</body> | ||
|
||
</html> |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
export const buildIndex = async (lists: Record<string, unknown>) => { | ||
const html = await Bun.file(`src/index.html`).text() | ||
|
||
const newContent = html.replace('`<!--LISTS-->`', JSON.stringify(lists)); | ||
await Bun.write('lists/index.html', newContent) | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>PancakeSwap Token Lists</title> | ||
</head> | ||
|
||
<body> | ||
|
||
<script type="module"> | ||
const LISTS = `<!--LISTS-->`; | ||
|
||
const lis = Object.keys(LISTS).map((list) => { | ||
return ` | ||
<li> | ||
<a href="/${list}.json">${list}</a> | ||
</li> | ||
<br /> | ||
` | ||
}); | ||
const ul = document.createElement('ul'); | ||
ul.innerHTML = lis.join(''); | ||
document.body.appendChild(ul); | ||
</script> | ||
</body> | ||
|
||
</html> |
Oops, something went wrong.