这是indexloc提供的服务,不要输入任何密码
Skip to content

Allow barrel files in ui starter packages #305

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion create-turbo/templates/_shared_ts/apps/docs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "docs",
"version": "1.0.0",
"version": "0.0.0",
"private": true,
"scripts": {
"dev": "next dev --port 3001",
Expand Down
2 changes: 1 addition & 1 deletion create-turbo/templates/_shared_ts/apps/web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "web",
"version": "1.0.0",
"version": "0.0.0",
"private": true,
"scripts": {
"dev": "next dev",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "config",
"version": "1.0.0",
"version": "0.0.0",
"main": "index.js",
"license": "MIT",
"files": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# `tsconfig`

This is the base shared `tsconfig.json` from which all other `tsconfig.json`'s inherit from.
These are base shared `tsconfig.json`s from which all other `tsconfig.json`'s inherit from.
1 change: 1 addition & 0 deletions create-turbo/templates/_shared_ts/packages/ui/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./Button";
14 changes: 10 additions & 4 deletions create-turbo/templates/_shared_ts/packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
{
"name": "ui",
"version": "1.0.0",
"main": "./Button.tsx",
"types": "./Button.tsx",
"license": "MIT"
"version": "0.0.0",
"main": "./index.tsx",
"types": "./index.tsx",
"license": "MIT",
"devDependencies": {
"@types/react": "^17.0.37",
"@types/react-dom": "^17.0.11",
"tsconfig": "*",
"typescript": "^4.5.2"
}
}
7 changes: 7 additions & 0 deletions create-turbo/templates/_shared_ts/packages/ui/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "tsconfig/react-library.json",
"compilerOptions": {
"jsx": "react-jsx"
},
"exclude": ["node_modules"]
}
33 changes: 30 additions & 3 deletions docs/pages/docs/reference/command-line-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,37 @@ With the `--docker` flag. The `prune` command will generate folder called `out`
└── yarn.lock # The pruned lockfile for all targets in the subworkspace
```

## `turbo login`

Connect machine to your Remote Cache provider. The default provider is [Vercel](https://vercel.com).

### Options

#### `--url`

`type: string`

Defaults to `https://vercel.com`.

#### `--api`

`type: string`

Defaults to `https://api.vercel.com`.

## `turbo link`

Link the current directory to an existing Vercel organization or user. The selected owner (either a user or and organization) will be able to share [cache artifacts](../caching).
Link the current directory to Remote Cache scope. The selected owner (either a user or and organization) will be able to share [cache artifacts](../features/caching) through [Remote Caching](../features/remote-caching).
You should run this command from the root of your monorepo.

### Options

#### `--api`

`type: string`

Defaults to `https://api.vercel.com`

## `turbo unlink`
### `turbo unlink`

Unlink the current directory from a Vercel organization or user.
Unlink the current directory from the Remote Cache
6 changes: 4 additions & 2 deletions examples/basic/apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@
"ui": "*"
},
"devDependencies": {
"eslint": "7.32.0",
"tsconfig": "*",
"@types/react": "^17.0.37",
"@types/react-dom": "^17.0.11",
"config": "*",
"eslint": "7.32.0",
"next-transpile-modules": "^9.0.0",
"tsconfig": "*",
"typescript": "^4.5.2"
}
}
4 changes: 3 additions & 1 deletion examples/basic/apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@
"lint": "next lint"
},
"dependencies": {
"next": "12.0.3",
"next": "^12.0.7",
"react": "17.0.2",
"react-dom": "17.0.2",
"ui": "*"
},
"devDependencies": {
"@types/react": "^17.0.37",
"@types/react-dom": "^17.0.11",
"config": "*",
"eslint": "7.32.0",
"next-transpile-modules": "^9.0.0",
Expand Down
8 changes: 1 addition & 7 deletions examples/basic/packages/config/eslint-preset.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@ module.exports = {
extends: ["next", "prettier"],
settings: {
next: {
rootDir: [
"apps/docs/",
"apps/web/",
"packages/ui/",
"packages/config/",
"packages/tsconfig/",
],
rootDir: ["apps/*/", "packages/*/"],
},
},
};
3 changes: 0 additions & 3 deletions examples/basic/packages/tsconfig/README.md

This file was deleted.

1 change: 1 addition & 0 deletions examples/basic/packages/ui/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./Button";
14 changes: 10 additions & 4 deletions examples/basic/packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
{
"name": "ui",
"version": "1.0.0",
"main": "./Button.tsx",
"types": "./Button.tsx",
"license": "MIT"
"version": "0.0.0",
"main": "./index.tsx",
"types": "./index.tsx",
"license": "MIT",
"devDependencies": {
"@types/react": "^17.0.37",
"@types/react-dom": "^17.0.11",
"tsconfig": "*",
"typescript": "^4.5.2"
}
}
7 changes: 7 additions & 0 deletions examples/basic/packages/ui/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "tsconfig/react-library.json",
"compilerOptions": {
"jsx": "react-jsx"
},
"exclude": ["node_modules"]
}
3 changes: 0 additions & 3 deletions examples/with-pnpm/packages/tsconfig/README.md

This file was deleted.

11 changes: 0 additions & 11 deletions examples/with-pnpm/packages/tsconfig/node12.json

This file was deleted.

14 changes: 0 additions & 14 deletions examples/with-pnpm/packages/tsconfig/node14.json

This file was deleted.

19 changes: 0 additions & 19 deletions examples/with-pnpm/packages/tsconfig/vite.json

This file was deleted.

1 change: 1 addition & 0 deletions examples/with-pnpm/packages/ui/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./Button";
14 changes: 10 additions & 4 deletions examples/with-pnpm/packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
{
"name": "ui",
"version": "1.0.0",
"main": "./Button.tsx",
"types": "./Button.tsx",
"license": "MIT"
"version": "0.0.0",
"main": "./index.tsx",
"types": "./index.tsx",
"license": "MIT",
"devDependencies": {
"@types/react": "^17.0.37",
"@types/react-dom": "^17.0.11",
"tsconfig": "workspace:*",
"typescript": "^4.5.2"
}
}
7 changes: 7 additions & 0 deletions examples/with-pnpm/packages/ui/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "tsconfig/react-library.json",
"compilerOptions": {
"jsx": "react-jsx"
},
"exclude": ["node_modules"]
}