Skip to content

Commit

Permalink
inital commit
Browse files Browse the repository at this point in the history
  • Loading branch information
reedHam committed Apr 24, 2022
1 parent fa52d69 commit d4ca2ed
Show file tree
Hide file tree
Showing 18 changed files with 3,885 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
build
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"cSpell.words": [
"vite"
]
}
22 changes: 22 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "vite-template-solid",
"version": "0.0.0",
"description": "",
"scripts": {
"start": "vite",
"dev": "vite",
"build": "vite build && cp -r ./build /mnt/e/extentions",
"serve": "vite preview"
},
"license": "MIT",
"devDependencies": {
"typescript": "^4.6.3",
"vite": "^2.8.6",
"vite-plugin-solid": "^2.2.6",
"vite-plugin-web-extension": "^1.3.1"
},
"dependencies": {
"solid-js": "^1.3.13",
"webext-bridge": "^5.0.4"
}
}
Binary file added src/assets/icon_128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icon_16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icon_32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icon_48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file added src/background/background.ts
Empty file.
26 changes: 26 additions & 0 deletions src/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"manifest_version": 2,
"version": "1.0",
"name": "Absolute Annals",
"author": "absolute-annals",
"description": "Tools for collecting metadata from the web.",
"background": {
"scripts": ["background/background.ts"]
},
"browser_action": {
"default_icon": {
"16": "assets/icon_16.png",
"32": "assets/icon_32.png",
"48": "assets/icon_48.png",
"128": "assets/icon_128.png"
},
"default_title": "Absolute Annals",
"default_popup": "popup/popup.html"
},
"content_scripts": [
{
"matches": ["*://*.youtube.com/*"],
"js": ["scripts/youtube.ts"]
}
]
}
33 changes: 33 additions & 0 deletions src/popup/App.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
.App {
text-align: center;
}

.logo {
animation: logo-spin infinite 20s linear;
height: 40vmin;
pointer-events: none;
}

.header {
background-color: #282c34;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
}

.link {
color: #b318f0;
}

@keyframes logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
12 changes: 12 additions & 0 deletions src/popup/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import type { Component } from 'solid-js';

import styles from './App.module.css';

const App: Component = () => {
return (
<div class={styles.App}>
</div>
);
};

export default App;
13 changes: 13 additions & 0 deletions src/popup/popup.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}
16 changes: 16 additions & 0 deletions src/popup/popup.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<link rel="shortcut icon" type="image/ico" href="/src/assets/favicon.ico" />
<title>Solid App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>

<script src="./popup.tsx" type="module"></script>
</body>
</html>
7 changes: 7 additions & 0 deletions src/popup/popup.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/* @refresh reload */
import { render } from 'solid-js/web';

import './popup.css';
import App from './App';

render(() => <App />, document.getElementById('root') as HTMLElement);
Empty file added src/scripts/youtube.ts
Empty file.
15 changes: 15 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"compilerOptions": {
"strict": true,
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "node",
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"jsx": "preserve",
"jsxImportSource": "solid-js",
"types": ["vite/client"],
"noEmit": true,
"isolatedModules": true
}
}
25 changes: 25 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { defineConfig } from 'vite';
import solidPlugin from 'vite-plugin-solid';
import webExtension from "vite-plugin-web-extension";
import path from 'path';

export default defineConfig({
root: "src",
// Configure our outputs - nothing special, this is normal vite config
plugins: [
solidPlugin(),
webExtension({
manifest: path.resolve(__dirname, "src/manifest.json"),
assets: "assets",
webExtConfig: {
firefox: "firefox",
},
}),
],
build: {
outDir: path.resolve(__dirname, "build"),
target: 'esnext',
polyfillDynamicImport: false,
emptyOutDir: true,
},
});
Loading

0 comments on commit d4ca2ed

Please sign in to comment.