Skip to content

Commit 6659370

Browse files
committed
Initial commit
1 parent 35aee76 commit 6659370

Some content is hidden

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

45 files changed

+10942
-870
lines changed

.eslintrc.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
module.exports = {
22
root: true,
33
// This tells ESLint to load the config from the package `eslint-config-custom`
4-
extends: ["custom"],
5-
settings: {
6-
next: {
7-
rootDir: ["apps/*/"],
8-
},
9-
},
4+
extends: ['custom'],
105
};

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,6 @@ yarn-error.log*
3131

3232
# turbo
3333
.turbo
34+
35+
# compiled output
36+
dist

.npmignore

Whitespace-only changes.

.vscode/settings.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"json.schemas": [
3+
{
4+
"url": "https://cdn.jsdelivr.net/npm/tsup/schema.json",
5+
"fileMatch": [
6+
"package.json",
7+
"tsup.config.json"
8+
]
9+
}
10+
]
11+
}

README.md

Lines changed: 6 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,13 @@
1-
# Turborepo starter
1+
# Strapi Utils
22

3-
This is an official Yarn v1 starter turborepo.
3+
This is a collection of utilities that I've created to make my life easier in working with [Strapi](https://strapi.io).
44

55
## What's inside?
66

7-
This turborepo uses [Yarn](https://classic.yarnpkg.com/) as a package manager. It includes the following packages/apps:
7+
This is a turborepo monorepo using [Yarn](https://classic.yarnpkg.com/) as a package manager. It includes the following packages:
88

9-
### Apps and Packages
9+
### Packages
1010

11-
- `docs`: a [Next.js](https://nextjs.org/) app
12-
- `web`: another [Next.js](https://nextjs.org/) app
13-
- `ui`: a stub React component library shared by both `web` and `docs` applications
14-
- `eslint-config-custom`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`)
15-
- `tsconfig`: `tsconfig.json`s used throughout the monorepo
11+
- `strapi-client`: a generic API client for Strapi
1612

17-
Each package/app is 100% [TypeScript](https://www.typescriptlang.org/).
18-
19-
### Utilities
20-
21-
This turborepo has some additional tools already setup for you:
22-
23-
- [TypeScript](https://www.typescriptlang.org/) for static type checking
24-
- [ESLint](https://eslint.org/) for code linting
25-
- [Prettier](https://prettier.io) for code formatting
26-
27-
### Build
28-
29-
To build all apps and packages, run the following command:
30-
31-
```
32-
cd my-turborepo
33-
yarn run build
34-
```
35-
36-
### Develop
37-
38-
To develop all apps and packages, run the following command:
39-
40-
```
41-
cd my-turborepo
42-
yarn run dev
43-
```
44-
45-
### Remote Caching
46-
47-
Turborepo can use a technique known as [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching) to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.
48-
49-
By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can [create one](https://vercel.com/signup), then enter the following commands:
50-
51-
```
52-
cd my-turborepo
53-
npx turbo login
54-
```
55-
56-
This will authenticate the Turborepo CLI with your [Vercel account](https://vercel.com/docs/concepts/personal-accounts/overview).
57-
58-
Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your turborepo:
59-
60-
```
61-
npx turbo link
62-
```
63-
64-
## Useful Links
65-
66-
Learn more about the power of Turborepo:
67-
68-
- [Tasks](https://turbo.build/repo/docs/core-concepts/monorepos/running-tasks)
69-
- [Caching](https://turbo.build/repo/docs/core-concepts/caching)
70-
- [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching)
71-
- [Filtering](https://turbo.build/repo/docs/core-concepts/monorepos/filtering)
72-
- [Configuration Options](https://turbo.build/repo/docs/reference/configuration)
73-
- [CLI Usage](https://turbo.build/repo/docs/reference/command-line-reference)
13+
Each package/app is 100% [TypeScript](https://www.typescriptlang.org/).``

apps/docs/.eslintrc.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

apps/docs/README.md

Lines changed: 0 additions & 30 deletions
This file was deleted.

apps/docs/next-env.d.ts

Lines changed: 0 additions & 5 deletions
This file was deleted.

apps/docs/next.config.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

apps/docs/package.json

Lines changed: 0 additions & 27 deletions
This file was deleted.

apps/docs/pages/index.tsx

Lines changed: 0 additions & 10 deletions
This file was deleted.

apps/docs/tsconfig.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

apps/web/.eslintrc.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

apps/web/README.md

Lines changed: 0 additions & 30 deletions
This file was deleted.

apps/web/next-env.d.ts

Lines changed: 0 additions & 5 deletions
This file was deleted.

apps/web/next.config.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

apps/web/package.json

Lines changed: 0 additions & 27 deletions
This file was deleted.

apps/web/pages/index.tsx

Lines changed: 0 additions & 10 deletions
This file was deleted.

apps/web/tsconfig.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

package.json

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
11
{
22
"name": "strapi-utils",
3-
"version": "0.0.0",
3+
"version": "0.0.1",
44
"private": true,
5+
"author": {
6+
"name": "Richard Weaver",
7+
"email": "[email protected]",
8+
"url": "https://github.com/rixw"
9+
},
10+
"homepage": "https://github.com/rixw/strapi-utils",
11+
"repository": "https://github.com/rixw/strapi-utils",
12+
"bugs": "https://github.com/rixw/strapi-utils/issues",
513
"workspaces": [
6-
"apps/*",
714
"packages/*"
815
],
916
"scripts": {
1017
"build": "turbo run build",
1118
"dev": "turbo run dev",
1219
"lint": "turbo run lint",
20+
"test": "turbo run test",
21+
"test:watch": "turbo run test:watch",
1322
"format": "prettier --write \"**/*.{ts,tsx,md}\""
1423
},
1524
"devDependencies": {
@@ -21,5 +30,6 @@
2130
"node": ">=14.0.0"
2231
},
2332
"dependencies": {},
24-
"packageManager": "[email protected]"
25-
}
33+
"packageManager": "[email protected]",
34+
"license": "MIT"
35+
}
Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
11
module.exports = {
2-
extends: ["next", "turbo", "prettier"],
3-
rules: {
4-
"@next/next/no-html-link-for-pages": "off",
5-
},
6-
parserOptions: {
7-
babelOptions: {
8-
presets: [require.resolve("next/babel")],
9-
},
10-
},
2+
extends: ['turbo', 'prettier'],
113
};

packages/eslint-config-custom/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
"main": "index.js",
55
"license": "MIT",
66
"dependencies": {
7-
"eslint": "^7.23.0",
8-
"eslint-config-next": "13.0.0",
9-
"eslint-config-prettier": "^8.3.0",
10-
"eslint-plugin-react": "7.31.8",
11-
"eslint-config-turbo": "latest"
7+
"eslint": "^8.38.0",
8+
"eslint-config-next": "^13.3.0",
9+
"eslint-config-prettier": "^8.8.0",
10+
"eslint-config-turbo": "^1.8.8",
11+
"eslint-plugin-react": "^7.32.2"
1212
},
1313
"devDependencies": {
14-
"typescript": "^4.7.4"
14+
"typescript": "^5.0.4"
1515
},
1616
"publishConfig": {
1717
"access": "public"

0 commit comments

Comments
 (0)