Skip to content

Commit 6d387ce

Browse files
committed
Scope the package
1 parent 3fdc057 commit 6d387ce

7 files changed

Lines changed: 128 additions & 135 deletions

File tree

README.md

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
# fork-me
1+
# ForkMe
22

3-
[![test](https://github.com/react18-tools/fork-me/actions/workflows/test.yml/badge.svg)](https://github.com/react18-tools/fork-me/actions/workflows/test.yml) [![Maintainability](https://api.codeclimate.com/v1/badges/aa896ec14c570f3bb274/maintainability)](https://codeclimate.com/github/react18-tools/fork-me/maintainability) [![codecov](https://codecov.io/gh/react18-tools/fork-me/graph/badge.svg)](https://codecov.io/gh/react18-tools/fork-me) [![Version](https://img.shields.io/npm/v/fork-me.svg?colorB=green)](https://www.npmjs.com/package/fork-me) [![Downloads](https://img.jsdelivr.com/img.shields.io/npm/d18m/fork-me.svg)](https://www.npmjs.com/package/fork-me) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/fork-me) [![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/from-referrer/)
3+
[![test](https://github.com/react18-tools/fork-me/actions/workflows/test.yml/badge.svg)](https://github.com/react18-tools/fork-me/actions/workflows/test.yml) [![Maintainability](https://api.codeclimate.com/v1/badges/aa896ec14c570f3bb274/maintainability)](https://codeclimate.com/github/react18-tools/fork-me/maintainability) [![codecov](https://codecov.io/gh/react18-tools/fork-me/graph/badge.svg)](https://codecov.io/gh/react18-tools/fork-me) [![Version](https://img.shields.io/npm/v/@mayank1513/fork-me.svg?colorB=green)](https://www.npmjs.com/package/@mayank1513/fork-me) [![Downloads](https://img.jsdelivr.com/img.shields.io/npm/d18m/@mayank1513/fork-me.svg)](https://www.npmjs.com/package/@mayank1513/fork-me) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/@mayank1513/fork-me) [![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/from-referrer/)
44

55
> [Featured packages built with this template.](./FEATURED.md)
66
77
> We are happy to announce that we have launched a new course to help you understand this template better [Craft Next Gen UI Libraries for React 18 and Next.js 14](https://www.udemy.com/course/craft-next-gen-ui-libraries-for-react-18-and-nextjs-14/?referralCode=46B8C7845ECCEA99E0EF)
88
99
## Features
1010

11-
✅ Fully Treeshakable (import from fork-me/client/component)
11+
✅ Fully Treeshakable (import from @mayank1513/fork-me/client/component)
1212

1313
✅ Full TypeScript Support
1414

@@ -21,24 +21,21 @@
2121
## Install
2222

2323
```bash
24-
$ pnpm add fork-me
24+
$ pnpm add @mayank1513/fork-me
2525
```
2626

2727
or
2828

2929
```bash
30-
$ npm install fork-me
30+
$ npm install @mayank1513/fork-me
3131
```
3232

3333
or
3434

3535
```bash
36-
$ yarn add fork-me
36+
$ yarn add @mayank1513/fork-me
3737
```
3838

39-
40-
41-
4239
## Getting started:
4340

4441
Click on the `"Use this template"` button to customize it for your next JavaScript/TypeScript/React/Vue/Next.js library or project.
@@ -62,21 +59,21 @@ Compared to the default scaffold from create-turbo, this template offers:
6259
- [ ] Please make sure `owner` is set to your <npmjs.com> username before running the above command.
6360
- [ ] Set up `CodeCov`
6461
- [ ] Visit codecov and setup your repo
65-
- [ ] Create [repository secret](https://github.com/react18-tools/fork-me/settings/secrets/actions) for `CODECOV_TOKEN`
62+
- [ ] Create [repository secret](https://github.com/react18-tools/@mayank1513/fork-me/settings/secrets/actions) for `CODECOV_TOKEN`
6663
- [ ] Set up `CodeClimate`
6764
- [ ] Visit CodeClimate and setup your repo
68-
- [ ] Create [repository secret](https://github.com/react18-tools/fork-me/settings/secrets/actions) for `CC_TEST_REPORTER_ID`
65+
- [ ] Create [repository secret](https://github.com/react18-tools/@mayank1513/fork-me/settings/secrets/actions) for `CC_TEST_REPORTER_ID`
6966
- [ ] add `*.test.*` to ignore patterns on the website
7067
- [ ] update code climate badge
7168
- [ ] Add `NPM_AUTH_TOKEN` to repository secrets to automate publishing package
7269
- [ ] login to your [`npm` account](https://www.npmjs.com/login) and create automation token
7370
- [ ] Create a new repository secrets `NPM_AUTH_TOKEN`
74-
- [ ] Update description in `lib/fork-me/package.json`
71+
- [ ] Update description in `lib/@mayank1513/fork-me/package.json`
7572
- [ ] Update Repo Stats by visiting and setting up [repobeats](https://repobeats.axiom.co/)
7673
- [ ] Create your library and update examples
7774
- [ ] Update README
7875
- [ ] Setup GitHub pages to deploy docs
79-
- [ ] Go to [repo settings](https://github.com/react18-tools/fork-me/settings/pages) -> pages (On left panel); Select deploy from a branch; Then Select `main` and `/docs`
76+
- [ ] Go to [repo settings](https://github.com/react18-tools/@mayank1513/fork-me/settings/pages) -> pages (On left panel); Select deploy from a branch; Then Select `main` and `/docs`
8077
- [ ] (Optional) Set up [Deepsource](https://app.deepsource.com/login) for static code analysis
8178
- [ ] Push your changes/Create PR and see your library being automatically tested and published
8279
- [ ] Optionally deploy your example(s) to Vercel.
@@ -103,7 +100,7 @@ This Turborepo includes the following packages/examples/lib:
103100

104101
- `nextjs`: a [Next.js](https://nextjs.org/) app
105102
- `vite`: a [Vite.js](https://vitest.dev) app
106-
- `fork-me`: a React component library shared by both `Next.js` and `Vite` examples
103+
- `@mayank1513/fork-me`: a React component library shared by both `Next.js` and `Vite` examples
107104
- `eslint-config-custom`: ESLint configurations (includes `eslint-config-next` and `eslint-config-prettier`)
108105
- `tsconfig`: `tsconfig.json`s used throughout the monorepo
109106

@@ -114,7 +111,7 @@ Each package/example is 100% [TypeScript](https://www.typescriptlang.org/).
114111
To build all apps and packages, run the following command:
115112

116113
```
117-
cd fork-me
114+
cd @mayank1513/fork-me
118115
pnpm build
119116
```
120117

@@ -123,7 +120,7 @@ pnpm build
123120
To develop all apps and packages, run the following command:
124121

125122
```
126-
cd fork-me
123+
cd @mayank1513/fork-me
127124
pnpm dev
128125
```
129126

@@ -138,7 +135,7 @@ Learn more about the power of Turborepo:
138135
- [Configuration Options](https://turbo.build/repo/docs/reference/configuration)
139136
- [CLI Usage](https://turbo.build/repo/docs/reference/command-line-reference)
140137

141-
### 🤩 Don't forger to star [this repo](https://github.com/react18-tools/fork-me)!
138+
### 🤩 Don't forger to star [this repo](https://github.com/react18-tools/@mayank1513/fork-me)!
142139

143140
Want hands-on course for getting started with Turborepo? Check out [React and Next.js with TypeScript](https://mayank-chaudhari.vercel.app/courses/react-and-next-js-with-typescript) and [The Game of Chess with Next.js, React and TypeScrypt](https://www.udemy.com/course/game-of-chess-with-nextjs-react-and-typescrypt/?referralCode=851A28F10B254A8523FE)
144141

examples/nextjs/package.json

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,29 @@
11
{
2-
"name": "nextjs-example",
3-
"version": "0.0.0",
4-
"private": true,
5-
"scripts": {
6-
"dev": "next dev",
7-
"build": "next build",
8-
"start": "next start",
9-
"lint": "next lint",
10-
"postinstall": "next telemetry disable"
11-
},
12-
"dependencies": {
13-
"@mayank1513/fork-me": "latest",
14-
"fork-me": "workspace:*",
15-
"next": "^14.1.4",
16-
"nextjs-themes": "^3.1.0",
17-
"react": "^18.2.0",
18-
"react-dom": "^18.2.0",
19-
"shared-ui": "workspace:*"
20-
},
21-
"devDependencies": {
22-
"@next/eslint-plugin-next": "^14.1.4",
23-
"@types/node": "^20.12.5",
24-
"@types/react": "^18.2.74",
25-
"@types/react-dom": "^18.2.24",
26-
"eslint-config-custom": "workspace:*",
27-
"tsconfig": "workspace:*",
28-
"typescript": "^5.4.4"
29-
}
30-
}
2+
"name": "nextjs-example",
3+
"version": "0.0.0",
4+
"private": true,
5+
"scripts": {
6+
"dev": "next dev",
7+
"build": "next build",
8+
"start": "next start",
9+
"lint": "next lint",
10+
"postinstall": "next telemetry disable"
11+
},
12+
"dependencies": {
13+
"@mayank1513/fork-me": "workspace:*",
14+
"next": "^14.1.4",
15+
"nextjs-themes": "^3.1.0",
16+
"react": "^18.2.0",
17+
"react-dom": "^18.2.0",
18+
"shared-ui": "workspace:*"
19+
},
20+
"devDependencies": {
21+
"@next/eslint-plugin-next": "^14.1.4",
22+
"@types/node": "^20.12.5",
23+
"@types/react": "^18.2.74",
24+
"@types/react-dom": "^18.2.24",
25+
"eslint-config-custom": "workspace:*",
26+
"tsconfig": "workspace:*",
27+
"typescript": "^5.4.4"
28+
}
29+
}

examples/remix/package.json

Lines changed: 49 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,50 @@
11
{
2-
"name": "remix-example",
3-
"version": "0.0.0",
4-
"private": true,
5-
"sideEffects": false,
6-
"type": "module",
7-
"scripts": {
8-
"build": "remix build",
9-
"dev": "remix dev --manual",
10-
"start": "remix-serve ./build/index.js",
11-
"typecheck": "tsc"
12-
},
13-
"dependencies": {
14-
"@mayank1513/fork-me": "latest",
15-
"fork-me": "workspace:*",
16-
"@remix-run/css-bundle": "^2.8.1",
17-
"@remix-run/node": "^2.8.1",
18-
"@remix-run/react": "^2.8.1",
19-
"@remix-run/serve": "^2.8.1",
20-
"isbot": "5.1.4",
21-
"nextjs-themes": "^3.1.0",
22-
"react": "^18.2.0",
23-
"react-dom": "^18.2.0",
24-
"shared-ui": "workspace:*"
25-
},
26-
"devDependencies": {
27-
"@remix-run/dev": "^2.8.1",
28-
"@remix-run/eslint-config": "^2.8.1",
29-
"@types/react": "^18.2.74",
30-
"@types/react-dom": "^18.2.24",
31-
"eslint": "^9.0.0",
32-
"typescript": "^5.4.4"
33-
},
34-
"engines": {
35-
"node": ">=18.0.0"
36-
},
37-
"pnpm": {
38-
"packageExtensions": {
39-
"@remix-run/dev": {
40-
"peerDependencies": {
41-
"react-dom": "18.2.0"
42-
}
43-
},
44-
"@remix-run/serve": {
45-
"peerDependencies": {
46-
"react-dom": "18.2.0"
47-
}
48-
}
49-
}
50-
}
51-
}
2+
"name": "remix-example",
3+
"version": "0.0.0",
4+
"private": true,
5+
"sideEffects": false,
6+
"type": "module",
7+
"scripts": {
8+
"build": "remix build",
9+
"dev": "remix dev --manual",
10+
"start": "remix-serve ./build/index.js",
11+
"typecheck": "tsc"
12+
},
13+
"dependencies": {
14+
"@mayank1513/fork-me": "workspace:*",
15+
"@remix-run/css-bundle": "^2.8.1",
16+
"@remix-run/node": "^2.8.1",
17+
"@remix-run/react": "^2.8.1",
18+
"@remix-run/serve": "^2.8.1",
19+
"isbot": "5.1.4",
20+
"nextjs-themes": "^3.1.0",
21+
"react": "^18.2.0",
22+
"react-dom": "^18.2.0",
23+
"shared-ui": "workspace:*"
24+
},
25+
"devDependencies": {
26+
"@remix-run/dev": "^2.8.1",
27+
"@remix-run/eslint-config": "^2.8.1",
28+
"@types/react": "^18.2.74",
29+
"@types/react-dom": "^18.2.24",
30+
"eslint": "^9.0.0",
31+
"typescript": "^5.4.4"
32+
},
33+
"engines": {
34+
"node": ">=18.0.0"
35+
},
36+
"pnpm": {
37+
"packageExtensions": {
38+
"@remix-run/dev": {
39+
"peerDependencies": {
40+
"react-dom": "18.2.0"
41+
}
42+
},
43+
"@remix-run/serve": {
44+
"peerDependencies": {
45+
"react-dom": "18.2.0"
46+
}
47+
}
48+
}
49+
}
50+
}

examples/remix/remix.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/** @type {import('@remix-run/dev').AppConfig} */
22
export default {
33
ignoredRouteFiles: ["**/.*"],
4-
serverDependenciesToBundle: ["@mayank1513/fork-me", "shared-ui"],
4+
serverDependenciesToBundle: ["@mayank1513/@mayank1513/fork-me", "shared-ui"],
55
// appDirectory: "app",
66
// assetsBuildDirectory: "public/build",
77
// publicPath: "/build/",

examples/vite/package.json

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,31 @@
11
{
2-
"name": "vite-example",
3-
"private": true,
4-
"version": "0.0.0",
5-
"type": "module",
6-
"scripts": {
7-
"dev": "vite --port 3001",
8-
"build": "tsc && vite build",
9-
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
10-
"preview": "vite preview"
11-
},
12-
"dependencies": {
13-
"@mayank1513/fork-me": "latest",
14-
"fork-me": "workspace:*",
15-
"nextjs-themes": "^3.1.0",
16-
"react": "^18.2.0",
17-
"react-dom": "^18.2.0",
18-
"shared-ui": "workspace:*"
19-
},
20-
"devDependencies": {
21-
"@types/react": "^18.2.74",
22-
"@types/react-dom": "^18.2.24",
23-
"@typescript-eslint/eslint-plugin": "^7.5.0",
24-
"@typescript-eslint/parser": "^7.5.0",
25-
"@vitejs/plugin-react-swc": "^3.6.0",
26-
"eslint": "^9.0.0",
27-
"eslint-plugin-react-hooks": "^4.6.0",
28-
"eslint-plugin-react-refresh": "^0.4.6",
29-
"typescript": "^5.4.4",
30-
"vite": "^5.2.8"
31-
}
32-
}
2+
"name": "vite-example",
3+
"private": true,
4+
"version": "0.0.0",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite --port 3001",
8+
"build": "tsc && vite build",
9+
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
10+
"preview": "vite preview"
11+
},
12+
"dependencies": {
13+
"@mayank1513/fork-me": "workspace:*",
14+
"nextjs-themes": "^3.1.0",
15+
"react": "^18.2.0",
16+
"react-dom": "^18.2.0",
17+
"shared-ui": "workspace:*"
18+
},
19+
"devDependencies": {
20+
"@types/react": "^18.2.74",
21+
"@types/react-dom": "^18.2.24",
22+
"@typescript-eslint/eslint-plugin": "^7.5.0",
23+
"@typescript-eslint/parser": "^7.5.0",
24+
"@vitejs/plugin-react-swc": "^3.6.0",
25+
"eslint": "^9.0.0",
26+
"eslint-plugin-react-hooks": "^4.6.0",
27+
"eslint-plugin-react-refresh": "^0.4.6",
28+
"typescript": "^5.4.4",
29+
"vite": "^5.2.8"
30+
}
31+
}

lib/fork-me/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"name": "fork-me",
2+
"name": "@mayank1513/fork-me",
33
"author": "Mayank Kumar Chaudhari <https://mayank-chaudhari.vercel.app>",
44
"private": false,
5-
"version": "0.0.0",
5+
"version": "0.0.0",
66
"description": "An intuitive React.js fork me ribbon component for promoting open source project forks.",
77
"main": "./index.ts",
88
"types": "./index.ts",
@@ -79,4 +79,4 @@
7979
"mayank1513",
8080
"turborepo-trmplate"
8181
]
82-
}
82+
}

packages/shared-ui/package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,15 @@
22
"name": "shared-ui",
33
"author": "Mayank Kumar Chaudhari <https://mayank-chaudhari.vercel.app>",
44
"private": true,
5-
"version": "0.0.0",
5+
"version": "0.0.0",
66
"description": "Shared UI Package",
77
"main": "./index.ts",
88
"types": "./index.ts",
99
"scripts": {
1010
"lint": "eslint ."
1111
},
1212
"devDependencies": {
13-
"@mayank1513/fork-me": "latest",
14-
"fork-me": "workspace:*",
13+
"@mayank1513/fork-me": "workspace:*",
1514
"@types/node": "^20.12.5",
1615
"@types/react": "^18.2.74",
1716
"@types/react-dom": "^18.2.24",
@@ -25,4 +24,4 @@
2524
"dependencies": {
2625
"eslint": "^9.0.0"
2726
}
28-
}
27+
}

0 commit comments

Comments
 (0)