Skip to content

Commit

Permalink
Fix build error
Browse files Browse the repository at this point in the history
  • Loading branch information
thanhlmm committed Aug 7, 2022
1 parent 3f6e919 commit b0375a5
Show file tree
Hide file tree
Showing 19 changed files with 264 additions and 210 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,11 @@
"lodash": "^4.17.21",
"mark.js": "^8.11.1",
"numeral": "^2.0.6",
"svelte-portal": "^2.2.0",
"svelte-windicss-preprocess": "^4.2.8",
"tippy.js": "^6.3.7",
"vite-imagetools": "^4.0.4",
"webextension-polyfill": "^0.9.0",
"windicss": "^3.5.6"
},
"type": "module"
}
}
55 changes: 0 additions & 55 deletions src/components/ReportModal.svelte

This file was deleted.

3 changes: 2 additions & 1 deletion src/components/TxInfo/Changes.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<script>
import "./MoneyMove.svelte";
import NoResultsIcon from "~/entries/contentScript/assets/no-results.png";
const NoResultsIconUrl = new URL(NoResultsIcon, import.meta.url).href;
export let data;
export let id;
Expand All @@ -26,7 +27,7 @@
{:else}
<img
class="w-[84px] h-[84px] mx-auto"
src={NoResultsIcon}
src={NoResultsIconUrl}
alt="no-results"
/>
{/if}
Expand Down
31 changes: 0 additions & 31 deletions src/entries/contentScript/primary/App.svelte

This file was deleted.

9 changes: 0 additions & 9 deletions src/entries/contentScript/primary/main.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/entries/contentScript/views/TrxInfo.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import "~/components/TxInfo/User.svelte";
import "~/components/TxInfo/MoneyMove.svelte";
import "~/components/TxInfo/Changes.svelte";
import "~/components/ReportModal.svelte";
import "~/components/Footer.svelte";
export let hash;
Expand Down Expand Up @@ -62,7 +61,6 @@
.then((response) => response.data);
const transactionInfo = get(response, "data");
console.log("transactionInfo: ", transactionInfo);
if (isEmpty(transactionInfo)) {
unknownTRX = true;
Expand Down
9 changes: 9 additions & 0 deletions src/entries/options/App.normal.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<svelte:options tag="nimbus-options" />

<script lang="ts">
</script>

<div>Options</div>

<style>
</style>
17 changes: 0 additions & 17 deletions src/entries/options/App.svelte

This file was deleted.

22 changes: 13 additions & 9 deletions src/entries/options/index.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Options</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="./main.ts"></script>
</body>
</html>

<head>
<meta charset="UTF-8" />
<title>Options</title>
</head>

<body>
<div id="app"></div>
<script type="module" src="./main.ts"></script>
<nimbus-options />
</body>

</html>
10 changes: 6 additions & 4 deletions src/entries/options/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import App from "./App.svelte";
import "./App.normal.svelte";

new App({
target: document.getElementById("app"),
});
// TODO: Maybe we can code this page using React

// new App({
// target: document.getElementById("app"),
// });
10 changes: 10 additions & 0 deletions src/entries/popup/App.normal.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<svelte:options tag="nimbus-popup" />

<script lang="ts">
let hello = "Thanh Le";
</script>

<div>Hello {hello}</div>

<style>
</style>
17 changes: 0 additions & 17 deletions src/entries/popup/App.svelte

This file was deleted.

22 changes: 13 additions & 9 deletions src/entries/popup/index.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Popup</title>
</head>
<body style="min-width: 100px">
<div id="app"></div>
<script type="module" src="./main.ts"></script>
</body>
</html>

<head>
<meta charset="UTF-8" />
<title>Popup</title>
</head>

<body style="min-width: 100px">
<div id="app"></div>
<script type="module" src="./main.ts"></script>
<nimbus-popup />
</body>

</html>
8 changes: 4 additions & 4 deletions src/entries/popup/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import App from "./App.svelte";
import "./App.normal.svelte";

new App({
target: document.getElementById("app"),
});
// new App({
// target: document.getElementById("app"),
// });
28 changes: 0 additions & 28 deletions src/lib/PageContent.svelte

This file was deleted.

7 changes: 0 additions & 7 deletions svelte.config.js

This file was deleted.

2 changes: 0 additions & 2 deletions vite.config.components.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { defineConfig } from "vite";
import { svelte } from "@sveltejs/vite-plugin-svelte";
import { windi } from "svelte-windicss-preprocess";
import { imagetools } from "vite-imagetools";
import sveltePreprocess from "svelte-preprocess";
import path from "path";

Expand Down Expand Up @@ -35,6 +34,5 @@ export default defineConfig({
},
preprocess: [sveltePreprocess(), windi({})],
}),
imagetools(),
],
});
1 change: 1 addition & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export default defineConfig(({ mode }) => {
plugins: [
svelte({
preprocess: [sveltePreprocess(), windi({})],
exclude: ["*.normal.svelte"],
compilerOptions: {
customElement: true,
},
Expand Down
Loading

0 comments on commit b0375a5

Please sign in to comment.