Skip to content

Commit

Permalink
release: bump up 1.1.0 to 1.2.0 (#2)
Browse files Browse the repository at this point in the history
* feat!: migration snowpack -> vite

* feat: add color mode change button

* release: bump up 1.1.0 to 1.2.0
  • Loading branch information
SaidBySolo authored Jun 27, 2022
1 parent c928494 commit 9b61afa
Show file tree
Hide file tree
Showing 13 changed files with 1,433 additions and 5,372 deletions.
15 changes: 15 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
</head>

<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>

</html>
41 changes: 16 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,26 @@
{
"name": "hitomi-downloader-extension",
"version": "1.2.0",
"scripts": {
"start": "snowpack dev",
"build": "snowpack build",
"test": "web-test-runner \"src/**/*.test.tsx\"",
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx}\"",
"lint": "prettier --check \"src/**/*.{js,jsx,ts,tsx}\""
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview"
},
"dependencies": {
"@chakra-ui/react": "^1.6.12",
"@chakra-ui/icons": "^2.0.2",
"@chakra-ui/react": "^2.2.1",
"@emotion/react": "^11",
"@emotion/styled": "^11",
"framer-motion": "^5.2.1",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"framer-motion": "^6",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
"devDependencies": {
"@snowpack/plugin-dotenv": "^2.1.0",
"@snowpack/plugin-react-refresh": "^2.5.0",
"@snowpack/plugin-typescript": "^1.2.1",
"@snowpack/web-test-runner-plugin": "^0.2.2",
"@testing-library/react": "^11.2.6",
"@types/chai": "^4.2.17",
"@types/chrome": "^0.0.162",
"@types/mocha": "^8.2.2",
"@types/react": "^17.0.4",
"@types/react-dom": "^17.0.3",
"@types/snowpack-env": "^2.3.3",
"@web/test-runner": "^0.13.3",
"chai": "^4.3.4",
"prettier": "^2.2.1",
"snowpack": "^3.3.7",
"typescript": "^4.2.4"
"@types/chrome": "^0.0.191",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@vitejs/plugin-react": "^1.3.0",
"typescript": "^4.6.3",
"vite": "^2.9.9"
}
}
25 changes: 0 additions & 25 deletions public/index.html

This file was deleted.

2 changes: 1 addition & 1 deletion public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Hitomi Downloader extension",
"description": "Download directly from the web!",
"version": "1.1.0",
"version": "1.2.0",
"manifest_version": 3,
"action": {
"default_popup": "index.html"
Expand Down
35 changes: 0 additions & 35 deletions snowpack.config.mjs

This file was deleted.

15 changes: 14 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@ import {
AlertIcon,
useToast,
Link,
useColorMode,
IconButton,
} from '@chakra-ui/react';
import { MoonIcon, SunIcon } from '@chakra-ui/icons';

const api = 'http://localhost:6975';

const Footer = () => {
const { colorMode, toggleColorMode } = useColorMode();
return (
<Flex
as="footer"
Expand All @@ -41,6 +45,15 @@ const Footer = () => {
Github
</a>
</Text>
<IconButton
variant="ghost"
onClick={toggleColorMode}
aria-label={
colorMode === 'dark' ? 'Enable Light mode' : 'Enable Dark mode'
}
>
{colorMode === 'light' ? <MoonIcon /> : <SunIcon />}
</IconButton>
</Flex>
);
};
Expand All @@ -59,7 +72,7 @@ const CompatMode = ({ checkFunc }: { checkFunc: () => Promise<void> }) => {
<>
<Alert status="warning">
<AlertIcon />
Couldn't connect with Hitomi Downloader :(
Couldn't connect with Hitomi Downloader :{'('}
</Alert>
<Flex direction="column" height="100%">
<Flex
Expand Down
20 changes: 0 additions & 20 deletions src/index.tsx

This file was deleted.

15 changes: 15 additions & 0 deletions src/main.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React from 'react'
import { ChakraProvider } from '@chakra-ui/react'
import theme from './theme'
import * as ReactDOM from 'react-dom/client'
import App from './App'


const rootElement = document.getElementById('root') as HTMLElement
ReactDOM.createRoot(rootElement).render(
<React.StrictMode>
<ChakraProvider theme={theme}>
<App />
</ChakraProvider>
</React.StrictMode>,
)
48 changes: 26 additions & 22 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,31 @@
{
"include": ["src", "types"],
"compilerOptions": {
"module": "esnext",
"target": "esnext",
"moduleResolution": "node",
"jsx": "preserve",
"baseUrl": "./",
/* paths - import rewriting/resolving */
"paths": {
// If you configured any Snowpack aliases, add them here.
// Add this line to get types for streaming imports (packageOptions.source="remote"):
// "*": [".snowpack/types/*"]
// More info: https://www.snowpack.dev/guides/streaming-imports
},
/* noEmit - Snowpack builds (emits) files, not tsc. */
"noEmit": true,
/* Additional Options */
"strict": true,
"target": "ESNext",
"useDefineForClassFields": true,
"lib": [
"DOM",
"DOM.Iterable",
"ESNext"
],
"allowJs": false,
"skipLibCheck": true,
"types": ["mocha", "snowpack-env", "chrome"],
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true,
"importsNotUsedAsValues": "error"
}
}
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx"
},
"include": [
"src"
],
"references": [
{
"path": "./tsconfig.node.json"
}
]
}
8 changes: 8 additions & 0 deletions tsconfig.node.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"composite": true,
"module": "esnext",
"moduleResolution": "node"
},
"include": ["vite.config.ts"]
}
12 changes: 12 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'

// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
server: {
watch: {
usePolling: true,
},
},
})
5 changes: 0 additions & 5 deletions web-test-runner.config.js

This file was deleted.

Loading

0 comments on commit 9b61afa

Please sign in to comment.