Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e1a86a1

Browse files
committedAug 13, 2022
Initial commit
0 parents  commit e1a86a1

20 files changed

+3685
-0
lines changed
 

‎.editorconfig

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true

‎.github/workflows/format.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Format
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
format:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: pnpm/action-setup@v2.2.2
15+
16+
- name: Setup Node.js environment
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: 16
20+
21+
- name: Install dependencies
22+
run: pnpm install
23+
24+
- name: Format
25+
run: pnpm run format
26+
27+
- name: Add, Commit and Push
28+
uses: stefanzweifel/git-auto-commit-action@v4
29+
with:
30+
commit_message: 'Format'

‎.github/workflows/tests.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Build and Test
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ${{ matrix.operating-system }}
8+
9+
strategy:
10+
matrix:
11+
node-version: [16.x, 17.x]
12+
operating-system: [ubuntu-latest]
13+
14+
steps:
15+
- name: Checkout repo
16+
uses: actions/checkout@v2
17+
with:
18+
fetch-depth: 2
19+
20+
- uses: pnpm/action-setup@v2.2.2
21+
22+
- name: Setup Node.js environment ${{ matrix.node-version }}
23+
uses: actions/setup-node@v3
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
cache: pnpm
27+
28+
- name: Install dependencies
29+
run: pnpm install
30+
31+
- name: Install dependencies
32+
run: pnpm install
33+
34+
- name: Build
35+
run: pnpm run build
36+
37+
- name: Test
38+
run: pnpm run test
39+
env:
40+
CI: true
41+
42+
- name: Typecheck
43+
run: pnpm run typecheck

‎.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules
2+
dist
3+
gitignore
4+
5+
# VSC Settings
6+
.vscode/settings.json

‎.prettierrc

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"singleQuote": false,
3+
"endOfLine": "lf",
4+
"bracketSpacing": true,
5+
"htmlWhitespaceSensitivity": "ignore",
6+
"arrowParens": "always",
7+
"printWidth": 100,
8+
"jsxBracketSameLine": false,
9+
"semi": true,
10+
"useTabs": false,
11+
"tabWidth": 2,
12+
"trailingComma": "all"
13+
}

‎LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 {{me}}
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

‎README.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<p>
2+
<img width="100%" src="https://assets.solidjs.com/banner?type={{name_of_lib}}&background=tiles&project=%20" alt="{{name_of_lib}}">
3+
</p>
4+
5+
# {{name_of_lib}}
6+
7+
[![pnpm](https://img.shields.io/badge/maintained%20with-pnpm-cc00ff.svg?style=for-the-badge&logo=pnpm)](https://pnpm.io/)
8+
9+
{{desc_of_lib}}
10+
11+
> **Note** After using this template, you have to search and replace all `{{name_of_lib}}` and similar strings
12+
> with appropriate texts.
13+
>
14+
> `{{name_of_lib}}` should be a **kebab-case** string representing the name of you monorepo.
15+
>
16+
> `{{desc_of_lib}}` should be a **Normal case** string with the description of the repository.
17+
>
18+
> `{{me}}` should be a **kebab-case** string from your profile URL.
19+
20+
## Quick start
21+
22+
Install it:
23+
24+
```bash
25+
npm i {{name_of_lib}}
26+
# or
27+
yarn add {{name_of_lib}}
28+
# or
29+
pnpm add {{name_of_lib}}
30+
```
31+
32+
Use it:
33+
34+
```tsx
35+
import {{name_of_lib}} from '{{name_of_lib}}'
36+
```

‎dev/App.module.css

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
.App {
2+
text-align: center;
3+
}
4+
5+
.logo {
6+
animation: logo-spin infinite 20s linear;
7+
height: 40vmin;
8+
pointer-events: none;
9+
}
10+
11+
.header {
12+
background-color: #282c34;
13+
min-height: 100vh;
14+
display: flex;
15+
flex-direction: column;
16+
align-items: center;
17+
justify-content: center;
18+
font-size: calc(10px + 2vmin);
19+
color: white;
20+
}
21+
22+
.link {
23+
color: #b318f0;
24+
}
25+
26+
@keyframes logo-spin {
27+
from {
28+
transform: rotate(0deg);
29+
}
30+
to {
31+
transform: rotate(360deg);
32+
}
33+
}

‎dev/App.tsx

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import type { Component } from "solid-js";
2+
import logo from "./logo.svg";
3+
import styles from "./App.module.css";
4+
import { Hello } from "../src";
5+
6+
const App: Component = () => {
7+
return (
8+
<div class={styles.App}>
9+
<header class={styles.header}>
10+
<img src={logo} class={styles.logo} alt="logo" />
11+
<h1>
12+
<Hello></Hello>
13+
</h1>
14+
<p>
15+
Edit <code>src/App.tsx</code> and save to reload.
16+
</p>
17+
<a
18+
class={styles.link}
19+
href="https://github.com/solidjs/solid"
20+
target="_blank"
21+
rel="noopener noreferrer"
22+
>
23+
Learn Solid
24+
</a>
25+
</header>
26+
</div>
27+
);
28+
};
29+
30+
export default App;

‎dev/index.html

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="utf-8" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1" />
7+
<meta name="theme-color" content="#000000" />
8+
<title>Solid App</title>
9+
</head>
10+
11+
<body>
12+
<noscript>You need to enable JavaScript to run this app.</noscript>
13+
<div id="root"></div>
14+
15+
<script src="./index.tsx" type="module"></script>
16+
</body>
17+
18+
</html>

‎dev/index.tsx

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { render } from "solid-js/web";
2+
import "./styles.css";
3+
4+
import App from "./App";
5+
6+
render(() => <App />, document.getElementById("root")!);

‎dev/logo.svg

+1
Loading

‎dev/styles.css

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
body {
2+
margin: 0;
3+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu",
4+
"Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
5+
-webkit-font-smoothing: antialiased;
6+
-moz-osx-font-smoothing: grayscale;
7+
}
8+
9+
code {
10+
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace;
11+
}

‎dev/tsconfig.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"compilerOptions": {
4+
"types": ["vite/client"]
5+
},
6+
"include": ["./**/*"]
7+
}

‎dev/vite.config.ts

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { defineConfig } from "vite"
2+
import solidPlugin from "vite-plugin-solid"
3+
4+
export default defineConfig({
5+
plugins: [
6+
solidPlugin(),
7+
],
8+
build: {
9+
target: "esnext",
10+
},
11+
})

‎package.json

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
"version": "0.0.0",
3+
"name": "{{name_of_lib}}",
4+
"description": "{{desc_of_lib}}",
5+
"license": "MIT",
6+
"author": "{{me}}",
7+
"contributors": [],
8+
"repository": {
9+
"type": "git",
10+
"url": "git+https://github.com/{{me}}/{{name_of_lib}}.git"
11+
},
12+
"homepage": "https://github.com/{{me}}/{{name_of_lib}}#readme",
13+
"bugs": {
14+
"url": "https://github.com/{{me}}/{{name_of_lib}}/issues"
15+
},
16+
"private": false,
17+
"sideEffects": false,
18+
"type": "module",
19+
"files": [
20+
"dist"
21+
],
22+
"main": "dist/cjs/index.js",
23+
"module": "dist/esm/index.js",
24+
"types": "dist/types/index.d.ts",
25+
"exports": {
26+
".": {
27+
"solid": "./dist/source/index.jsx",
28+
"import": "./dist/esm/index.js",
29+
"browser": {
30+
"import": "./dist/esm/index.js",
31+
"require": "./dist/cjs/index.js"
32+
},
33+
"require": "./dist/cjs/index.js",
34+
"node": "./dist/cjs/index.js"
35+
}
36+
},
37+
"scripts": {
38+
"dev": "vite serve dev",
39+
"test": "echo \"test not setup\"",
40+
"build": "rollup -c",
41+
"prepublishOnly": "pnpm build",
42+
"format": "prettier -w \"src/**/*.{js,ts,json,css,tsx,jsx}\" \"dev/**/*.{js,ts,json,css,tsx,jsx}\"",
43+
"update-deps": "taze -w && pnpm i",
44+
"typecheck": "tsc --noEmit"
45+
},
46+
"dependencies": {},
47+
"peerDependencies": {
48+
"solid-js": ">=1.0.0"
49+
},
50+
"devDependencies": {
51+
"prettier": "2.7.1",
52+
"rollup": "^2.77.2",
53+
"rollup-preset-solid": "^1.4.0",
54+
"typescript": "^4.7.4",
55+
"solid-js": "^1.4.8",
56+
"taze": "^0.7.6",
57+
"vite": "^3.0.4",
58+
"vite-plugin-solid": "^2.3.0"
59+
},
60+
"keywords": [
61+
"solid"
62+
],
63+
"packageManager": "pnpm@7.5.0"
64+
}

0 commit comments

Comments
 (0)
Please sign in to comment.