Skip to content

Commit ef190a2

Browse files
clone t3-app
0 parents  commit ef190a2

File tree

149 files changed

+23275
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

149 files changed

+23275
-0
lines changed

.eslintrc.cjs

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/** @type {import("eslint").Linter.Config} */
2+
const config = {
3+
root: true,
4+
parser: "@typescript-eslint/parser",
5+
plugins: ["isaacscript", "import"],
6+
extends: [
7+
"plugin:@typescript-eslint/recommended-type-checked",
8+
"plugin:@typescript-eslint/stylistic-type-checked",
9+
"plugin:prettier/recommended",
10+
],
11+
parserOptions: {
12+
ecmaVersion: "latest",
13+
sourceType: "module",
14+
tsconfigRootDir: __dirname,
15+
projectService: true,
16+
},
17+
overrides: [
18+
// Template files don't have reliable type information
19+
{
20+
files: ["./cli/template/**/*.{ts,tsx}"],
21+
extends: ["plugin:@typescript-eslint/disable-type-checked"],
22+
},
23+
],
24+
rules: {
25+
// These off/not-configured-the-way-we-want lint rules we like & opt into
26+
"@typescript-eslint/no-explicit-any": "error",
27+
"@typescript-eslint/no-unused-vars": [
28+
"error",
29+
{ argsIgnorePattern: "^_", destructuredArrayIgnorePattern: "^_" },
30+
],
31+
"@typescript-eslint/consistent-type-imports": [
32+
"error",
33+
{ prefer: "type-imports", fixStyle: "inline-type-imports" },
34+
],
35+
"import/consistent-type-specifier-style": ["error", "prefer-inline"],
36+
37+
// For educational purposes we format our comments/jsdoc nicely
38+
"isaacscript/complete-sentences-jsdoc": "warn",
39+
"isaacscript/format-jsdoc-comments": "warn",
40+
41+
// These lint rules don't make sense for us but are enabled in the preset configs
42+
"@typescript-eslint/no-confusing-void-expression": "off",
43+
"@typescript-eslint/restrict-template-expressions": "off",
44+
45+
// This rule doesn't seem to be working properly
46+
"@typescript-eslint/prefer-nullish-coalescing": "off",
47+
},
48+
};
49+
50+
module.exports = config;

.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# mdx
2+
*.mdx linguist-detectable=false

.gitignore

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
### STANDARD GIT IGNORE FILE ###
2+
3+
# DEPENDENCIES
4+
node_modules/
5+
/.pnp
6+
.pnp.js
7+
package-lock.json
8+
yarn.lock
9+
10+
# TESTING
11+
/coverage
12+
*.lcov
13+
.nyc_output
14+
15+
# BUILD
16+
build/
17+
public/build/
18+
dist/
19+
generated/
20+
21+
# ENV FILES
22+
.env
23+
.env.local
24+
.env.development.local
25+
.env.test.local
26+
.env.production.local
27+
28+
# LOGS
29+
logs
30+
*.log
31+
npm-debug.log*
32+
yarn-debug.log*
33+
yarn-error.log*
34+
35+
# MISC
36+
.idea
37+
.cache/
38+
.next/
39+
next-env.d.ts
40+
.nuxt/
41+
tmp/
42+
temp/
43+
.docusaurus
44+
*.tsbuildinfo
45+
46+
# MAC
47+
._*
48+
.DS_Store
49+
Thumbs.db
50+
51+
.turbo
52+
.vercel
53+
54+
# Emacs backup files
55+
\#*
56+
.\#*
57+
58+
# TYPESCRIPT
59+
*.tsbuildinfo

.gitpod.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
tasks:
2+
- init: pnpm install
3+
vscode:
4+
extensions:
5+
- astro-build.astro-vscode
6+
- bradlc.vscode-tailwindcss

CONTRIBUTING.md

+107
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# Contribution Guidelines
2+
3+
When contributing to `create-t3-app`, whether on GitHub or in other community spaces:
4+
5+
- Be respectful, civil, and open-minded.
6+
- Before opening a new pull request, try searching through the [issue tracker](https://github.com/t3-oss/create-t3-app/issues) for known issues or fixes.
7+
- If you want to make code changes based on your personal opinion(s), make sure you open an issue first describing the changes you want to make, and open a pull request only when your suggestions get approved by maintainers.
8+
9+
## How to Contribute
10+
11+
### Prerequisites
12+
13+
In order to not waste your time implementing a change that has already been declined, or is generally not needed, start by [opening an issue](https://github.com/t3-oss/create-t3-app/issues/new/choose) describing the problem you would like to solve.
14+
15+
### Contributing via Codesandbox
16+
17+
You can contribute to this documentation on codesandbox which will automatically run all the setup command for you. [![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/github/t3-oss/create-t3-app).
18+
19+
### Setup your environment locally
20+
21+
_Some commands will assume you have the Github CLI installed, if you haven't, consider [installing it](https://github.com/cli/cli#installation), but you can always use the Web UI if you prefer that instead._
22+
23+
In order to contribute to this project, you will need to fork the repository:
24+
25+
```bash
26+
gh repo fork t3-oss/create-t3-app
27+
```
28+
29+
then, clone it to your local machine:
30+
31+
```bash
32+
gh repo clone <your-github-name>/create-t3-app
33+
```
34+
35+
This project uses [pnpm](https://pnpm.io) as its package manager. Install it if you haven't already:
36+
37+
```bash
38+
npm install -g pnpm
39+
```
40+
41+
Then, install the project's dependencies:
42+
43+
```bash
44+
pnpm install
45+
```
46+
47+
### Implement your changes
48+
49+
This project is a [Turborepo](https://turborepo.org/) monorepo. The code for the CLI is in the `cli` directory, and the docs is in the `www` directory. Now you're all setup and can start implementing your changes.
50+
51+
Here are some useful scripts for when you are developing:
52+
53+
| Command | Description |
54+
| ---------------- | ------------------------------------------------------- |
55+
| `pnpm dev:cli` | Builds and starts the CLI in watch-mode |
56+
| `pnpm dev:www` | Starts the development server for the docs with HMR |
57+
| `pnpm build:cli` | Builds the CLI |
58+
| `pnpm build:www` | Builds the docs |
59+
| `pnpm build` | Builds CLI and docs |
60+
| `pnpm format` | Formats the code |
61+
| `pnpm lint` | Lints the code |
62+
| `pnpm lint:fix` | Lints the code and fixes any errors |
63+
| `pnpm check` | Checks your code for typeerrors, formatting and linting |
64+
65+
When making commits, make sure to follow the [conventional commit](https://www.conventionalcommits.org/en/v1.0.0/) guidelines, i.e. prepending the message with `feat:`, `fix:`, `chore:`, `docs:`, etc... You can use `git status` to double check which files have not yet been staged for commit:
66+
67+
```bash
68+
git add <file> && git commit -m "feat/fix/chore/docs: commit message"
69+
```
70+
71+
### When you're done
72+
73+
Check that your code follows the project's style guidelines by running:
74+
75+
```bash
76+
pnpm check
77+
```
78+
79+
Please also make a manual, functional test of your changes.
80+
81+
If your change should appear in the changelog, i.e. it changes some behavior of either the CLI or the outputted application, it must be captured by `changeset` which is done by running
82+
83+
```bash
84+
pnpm changeset
85+
```
86+
87+
and filling out the form with the appropriate information. Then, add the generated changeset to git:
88+
89+
```bash
90+
git add .changeset/*.md && git commit -m "chore: add changeset"
91+
```
92+
93+
When all that's done, it's time to file a pull request to upstream:
94+
95+
```bash
96+
gh pr create --web
97+
```
98+
99+
and fill out the title and body appropriately. Again, make sure to follow the [conventional commit](https://www.conventionalcommits.org/en/v1.0.0/) guidelines for your title.
100+
101+
## Translations
102+
103+
For more information on how to help with translation, please see the [contributing guidelines for our docs](https://github.com/t3-oss/create-t3-app/blob/main/www/TRANSLATIONS.md).
104+
105+
## Credits
106+
107+
This documented was inspired by the contributing guidelines for [cloudflare/wrangler2](https://github.com/cloudflare/wrangler2/blob/main/CONTRIBUTING.md).

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 Shoubhit Dash
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

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
./cli/README.md

cli/.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist

cli/.yarnrc.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
packageExtensions:
2+
3+
dependencies:
4+
"#ansi-styles": npm:[email protected]
5+
"#supports-color": npm:[email protected]

0 commit comments

Comments
 (0)