Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Huy TA QUOC committed Apr 12, 2021
0 parents commit 4f03aca
Show file tree
Hide file tree
Showing 40 changed files with 3,945 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
.DS_Store
dist
dist-ssr
*.local
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Flexible Counter App

This project demonstrates switching between implementations of a store (Vuex, Redux, Valtio, MobX) and UI libraries/frameworks (Vue, React and Svelte).

## Instructions

### Run the app

```bash
npm run dev
```

### Switching back and forth

- To replace an implementation of the store with another, go to **src/modules/counter/infrastructure/store/counter.store.ts** and comment/uncomment the equivalent sections of the code.

- To replace Vue with Svelte (or vice versa):

- Go to **src/main.ts** and comment/uncomment the equivalent sections of the code.
- Go to **vite.config.ts** and comment/uncomment the equivalent parts of the code.

- To switch to React, you'll have to rename:
- **index-tsx.html** to **index.html**
- **tsconfig-tsx.json** to **tsconfig.json**
- **vite-tsx.config.ts** to **vite.config.ts**
13 changes: 13 additions & 0 deletions index-tsx.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
13 changes: 13 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
Loading

0 comments on commit 4f03aca

Please sign in to comment.