Skip to content

Commit 0e35e91

Browse files
committed
chore: first commit
0 parents  commit 0e35e91

18 files changed

+5048
-0
lines changed

.eslintrc.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"extends": ["algolia", "algolia/react", "algolia/typescript"],
3+
"settings": {
4+
"import/parsers": {
5+
"@typescript-eslint/parser": [".js", ".ts", ".tsx"]
6+
},
7+
"import/resolver": {
8+
"typescript": {
9+
"alwaysTryTypes": true
10+
}
11+
}
12+
},
13+
"rules": {
14+
"@typescript-eslint/explicit-function-return-type": "off",
15+
"react/react-in-jsx-scope": "off",
16+
"react/no-unknown-property": ["error", { "ignore": ["class"] }]
17+
}
18+
}

.gitignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
dist
2+
.solid
3+
.output
4+
.vercel
5+
.netlify
6+
netlify
7+
8+
# dependencies
9+
/node_modules
10+
11+
# IDEs and editors
12+
/.idea
13+
.project
14+
.classpath
15+
*.launch
16+
.settings/
17+
18+
# Temp
19+
gitignore
20+
21+
# System Files
22+
.DS_Store
23+
Thumbs.db
24+
25+
vite.config.ts.timestamp-*

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# SolidStart
2+
3+
Everything you need to build a Solid project, powered by [`solid-start`](https://start.solidjs.com);
4+
5+
## Creating a project
6+
7+
```bash
8+
# create a new project in the current directory
9+
npm init solid@latest
10+
11+
# create a new project in my-app
12+
npm init solid@latest my-app
13+
```
14+
15+
## Developing
16+
17+
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
18+
19+
```bash
20+
npm run dev
21+
22+
# or start the server and open the app in a new browser tab
23+
npm run dev -- --open
24+
```
25+
26+
## Building
27+
28+
Solid apps are built with _adapters_, which optimise your project for deployment to different environments.
29+
30+
By default, `npm run build` will generate a Node app that you can run with `npm start`. To use a different adapter, add it to the `devDependencies` in `package.json` and specify in your `vite.config.js`.

package.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"name": "exchanges-latency-test",
3+
"scripts": {
4+
"dev": "solid-start dev",
5+
"build": "solid-start build",
6+
"start": "solid-start start",
7+
"lint-ts": "tsc --noEmit",
8+
"lint-js": "eslint --ext .js,.ts,.tsx src",
9+
"lint": "npm run lint-ts && npm run lint-js"
10+
},
11+
"type": "module",
12+
"devDependencies": {
13+
"@babel/eslint-parser": "^7.21.3",
14+
"@types/debug": "^4.1.7",
15+
"@types/react": "^18.0.32",
16+
"@typescript-eslint/eslint-plugin": "^5.57.0",
17+
"@typescript-eslint/parser": "^5.57.0",
18+
"autoprefixer": "^10.4.13",
19+
"eslint": "^8.37.0",
20+
"eslint-config-algolia": "^20.1.0",
21+
"eslint-config-prettier": "^8.8.0",
22+
"eslint-import-resolver-typescript": "^3.5.4",
23+
"eslint-plugin-eslint-comments": "^3.2.0",
24+
"eslint-plugin-import": "^2.27.5",
25+
"eslint-plugin-jsdoc": "^40.1.1",
26+
"eslint-plugin-jsx-a11y": "^6.7.1",
27+
"eslint-plugin-prettier": "^4.2.1",
28+
"eslint-plugin-react": "^7.32.2",
29+
"eslint-plugin-react-hooks": "^4.6.0",
30+
"postcss": "^8.4.21",
31+
"prettier": "^2.8.7",
32+
"solid-start-node": "^0.2.19",
33+
"tailwindcss": "^3.2.4",
34+
"typescript": "^5.0.3",
35+
"vite": "^4.1.4"
36+
},
37+
"dependencies": {
38+
"@solidjs/meta": "^0.28.2",
39+
"@solidjs/router": "^0.8.2",
40+
"solid-js": "^1.6.16",
41+
"solid-start": "^0.2.24",
42+
"undici": "^5.15.1"
43+
},
44+
"engines": {
45+
"node": ">=16"
46+
}
47+
}

postcss.config.cjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/* eslint-disable import/no-commonjs */
2+
3+
module.exports = {
4+
plugins: {
5+
tailwindcss: {},
6+
autoprefixer: {},
7+
},
8+
};

public/favicon.ico

664 Bytes
Binary file not shown.

src/components/Counter.tsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { createSignal } from 'solid-js';
2+
3+
const Counter = () => {
4+
const [count, setCount] = createSignal(0);
5+
return (
6+
<button
7+
type="button"
8+
class="w-[200px] rounded-full bg-gray-100 border-2 border-gray-300 focus:border-gray-400 active:border-gray-400 px-[2rem] py-[1rem]"
9+
onClick={() => setCount(count() + 1)}
10+
>
11+
Clicks: {count()}
12+
</button>
13+
);
14+
};
15+
16+
export default Counter;

src/entry-client.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { mount, StartClient } from 'solid-start/entry-client';
2+
3+
mount(() => <StartClient />, document);

src/entry-server.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import {
2+
StartServer,
3+
createHandler,
4+
renderAsync,
5+
} from 'solid-start/entry-server';
6+
7+
export default createHandler(
8+
renderAsync((event) => <StartServer event={event} />)
9+
);

src/root.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;

0 commit comments

Comments
 (0)