Skip to content

Commit

Permalink
Rebrand 💖 <a href="https://mayank-chaudhari.vercel.app" target="_blan…
Browse files Browse the repository at this point in the history
…k">Mayank Kumar Chaudhari</a> [skip ci]
  • Loading branch information
mayank1513 committed Feb 22, 2024
1 parent 0fa7827 commit d2ab91c
Show file tree
Hide file tree
Showing 42 changed files with 60 additions and 132 deletions.
29 changes: 0 additions & 29 deletions .github/workflows/setup.yml

This file was deleted.

47 changes: 32 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Turborepo template
# nthul

[![test](https://github.com/react18-tools/turborepo-template/actions/workflows/test.yml/badge.svg)](https://github.com/react18-tools/turborepo-template/actions/workflows/test.yml) [![Maintainability](https://api.codeclimate.com/v1/badges/aa896ec14c570f3bb274/maintainability)](https://codeclimate.com/github/react18-tools/turborepo-template/maintainability) [![codecov](https://codecov.io/gh/react18-tools/turborepo-template/graph/badge.svg)](https://codecov.io/gh/react18-tools/turborepo-template) [![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/dt/@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/)
[![test](https://github.com/mayank1513/nthul/actions/workflows/test.yml/badge.svg)](https://github.com/mayank1513/nthul/actions/workflows/test.yml) [![Maintainability](https://api.codeclimate.com/v1/badges/aa896ec14c570f3bb274/maintainability)](https://codeclimate.com/github/mayank1513/nthul/maintainability) [![codecov](https://codecov.io/gh/mayank1513/nthul/graph/badge.svg)](https://codecov.io/gh/mayank1513/nthul) [![Version](https://img.shields.io/npm/v/nthul.svg?colorB=green)](https://www.npmjs.com/package/nthul) [![Downloads](https://img.jsdelivr.com/img.shields.io/npm/dt/nthul.svg)](https://www.npmjs.com/package/nthul) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/nthul) [![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/from-referrer/)

## Features

Expand Down Expand Up @@ -30,25 +30,42 @@ This template offers following pre-configured features. Additionally, your repo

✅ Workflow to automatically publish and create a GitHub release when you update your librari's `package.json` file.

✅ Workflow to automatically rebrand entire template based on the name of the repo you create from this template. (As soon as you create a repo from this template, setup workflow is triggered which renames @mayank1513/fork-me to your repo name and does lots of other fixes to set you up and running.)
✅ Workflow to automatically rebrand entire template based on the name of the repo you create from this template. (As soon as you create a repo from this template, setup workflow is triggered which renames nthul to your repo name and does lots of other fixes to set you up and running.)

✅ With all these features, this readme file contains a quick checklist for you to configure Codecov and other badges, setup your docs website on GitHub pages, etc. See [Checklist](https://github.com/react18-tools/turborepo-template/#checklist).
✅ With all these features, this readme file contains a quick checklist for you to configure Codecov and other badges, setup your docs website on GitHub pages, etc. See [Checklist](https://github.com/mayank1513/nthul/#checklist).

#### Create a library that is

✅ Fully Treeshakable (import from @mayank1513/fork-me/client/component)
✅ Fully Treeshakable (import from nthul/client/component)

✅ Full TypeScript Support

✅ Unleash the full power of React18 Server components

✅ Works with all build systems/tools/frameworks for React18

✅ Doccumented with [Typedoc](https://react18-tools.github.io/turborepo-template) ([Docs](https://react18-tools.github.io/turborepo-template))
✅ Doccumented with [Typedoc](https://mayank1513.github.io/nthul) ([Docs](https://react18-tools.github.io/turborepo-template))

## Install

```bash
$ pnpm add nthul
```

or

```bash
$ npm install nthul
```

or

```bash
$ yarn add nthul
```


## Introduction

This template is based on the official starter Turborepo but with additional features tailored for creating and publishing JavaScript/TypeScript and specifically React18 libraries.

## Getting started:

Expand All @@ -68,8 +85,8 @@ Compared to the default scaffold from create-turbo, this template offers:

## Step by Step Instructions and Checklist

- [ ] Star [this repo](https://github.com/react18-tools/turborepo-template/) so that you and others can find it more easily for your next projects. It also helps me understand that people are using this repo so that I can maintain the repo and the documentation well.
- [ ] Clone this repo
- [ ] Star [this repo](https://github.com/mayank1513/nthul/) so that you and others can find it more easily for your next projects. It also helps me understand that people are using this repo so that I can maintain the repo and the documentation well.

- [ ] Install and setup Node.js and IDE (I prefer VSCode)
- [ ] Install the recommended VSCode extensions - [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode), [Trello Kanban](https://marketplace.visualstudio.com/items?itemName=mayank1513.trello-kanban-task-board)
- [ ] Install dependencies using `pnpm`
Expand All @@ -90,12 +107,12 @@ Compared to the default scaffold from create-turbo, this template offers:
- [ ] Add `NPM_AUTH_TOKEN` to repository secrets to automate publishing package
- [ ] login to your `npm` account and create automation token
- [ ] Create a new repository secrets `NPM_AUTH_TOKEN`
- [ ] Update description in `lib/@mayank1513/fork-me/package.json`
- [ ] Update description in `lib/nthul/package.json`
- [ ] Update Repo Stats by visiting and setting up [repobeats](https://repobeats.axiom.co/)
- [ ] Create your library and update examples
- [ ] Update README
- [ ] Setup GitHub pages to deploy docs
- [ ] Go to [repo settings](https://github.com/react18-tools/turborepo-template/settings/pages) -> pages (On left panel); Select deploy from a branch; Then Select `main` and `/docs`
- [ ] Go to [repo settings](https://github.com/mayank1513/nthul/settings/pages) -> pages (On left panel); Select deploy from a branch; Then Select `main` and `/docs`
- [ ] Push your changes/Create PR and see your library being automatically tested and published
- [ ] Optionally deploy your example(s) to Vercel.
- [ ] You are most welcome to star this template, contribute, and/or sponsor the `terbo-repo-template` project or my other open-source work
Expand Down Expand Up @@ -129,7 +146,7 @@ Each package/example is 100% [TypeScript](https://www.typescriptlang.org/).
To build all apps and packages, run the following command:

```
cd my-turborepo
cd nthul
pnpm build
```

Expand All @@ -138,7 +155,7 @@ pnpm build
To develop all apps and packages, run the following command:

```
cd my-turborepo
cd nthul
pnpm dev
```

Expand All @@ -153,7 +170,7 @@ Learn more about the power of Turborepo:
- [Configuration Options](https://turbo.build/repo/docs/reference/configuration)
- [CLI Usage](https://turbo.build/repo/docs/reference/command-line-reference)

### 🤩 Don't forger to start [this repo](https://github.com/mayank1513/turborepo-template)!
### 🤩 Don't forger to start [this repo](https://github.com/mayank1513/nthul)!

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)

Expand Down
8 changes: 4 additions & 4 deletions contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Each package/example is 100% [TypeScript](https://www.typescriptlang.org/).
To build all apps and packages, run the following command:

```bash
cd my-turborepo
cd nthul
pnpm build
```

Expand All @@ -44,7 +44,7 @@ pnpm build
To develop all apps and packages, run the following command:

```bash
cd my-turborepo
cd nthul
pnpm dev
```

Expand All @@ -53,7 +53,7 @@ pnpm dev
To run unit tests, run the following command:

```bash
cd my-turborepo
cd nthul
pnpm test
```

Expand All @@ -62,7 +62,7 @@ pnpm test
Before creating PR make sure lint is passing and also run formatter to properly format the code.

```bash
cd my-turborepo
cd nthul
pnpm lint
```

Expand Down
5 changes: 3 additions & 2 deletions examples/nextjs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nextjs-example",
"version": "1.0.5",
"version": "0.0.0",
"private": true,
"scripts": {
"dev": "next dev",
Expand All @@ -10,7 +10,8 @@
"postinstall": "next telemetry disable"
},
"dependencies": {
"@mayank1513/fork-me": "workspace:*",
"@mayank1513/fork-me": "latest",
"nthul": "workspace:*",
"next": "^14.1.0",
"nextjs-themes": "^2.1.1",
"react": "^18.2.0",
Expand Down
3 changes: 2 additions & 1 deletion examples/remix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"typecheck": "tsc"
},
"dependencies": {
"@mayank1513/fork-me": "workspace:*",
"@mayank1513/fork-me": "latest",
"nthul": "workspace:*",
"@remix-run/css-bundle": "^2.6.0",
"@remix-run/node": "^2.6.0",
"@remix-run/react": "^2.6.0",
Expand Down
5 changes: 3 additions & 2 deletions examples/vite/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vite-example",
"private": true,
"version": "0.0.5",
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite --port 3001",
Expand All @@ -10,7 +10,8 @@
"preview": "vite preview"
},
"dependencies": {
"@mayank1513/fork-me": "workspace:*",
"@mayank1513/fork-me": "latest",
"nthul": "workspace:*",
"nextjs-themes": "^2.1.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions lib/fork-me/package.json → lib/nthul/package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"name": "@mayank1513/fork-me",
"name": "nthul",
"author": "Mayank Kumar Chaudhari <https://mayank-chaudhari.vercel.app>",
"private": false,
"version": "2.0.1",
"version": "0.0.0",
"description": "An intuitive React.js fork me ribbon component for promoting open source project forks.",
"main": "./index.ts",
"types": "./index.ts",
"repository": {
"type": "git",
"url": "git+https://github.com/react18-tools/turborepo-template.git"
"url": "git+https://github.com/mayank1513/nthul.git"
},
"bugs": {
"url": "https://github.com/react18-tools/turborepo-template/issues"
"url": "https://github.com/mayank1513/nthul/issues"
},
"homepage": "https://github.com/react18-tools/turborepo-template/tree/main/lib/fork-me#readme",
"homepage": "https://github.com/mayank1513/nthul/tree/main/lib/fork-me#readme",
"sideEffects": false,
"license": "MIT",
"scripts": {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/fork-me/touchup.js → lib/nthul/touchup.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fs.writeFileSync(
JSON.stringify(packageJson, null, 2),
);

fs.copyFileSync(path.resolve(__dirname, "README.md"), path.resolve(__dirname, "dist", "README.md"));
fs.copyFileSync(path.resolve(__dirname, "..", "..", "README.md"), path.resolve(__dirname, "dist", "README.md"));

const dirs = [path.resolve(__dirname, "dist")];

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"doc": "turbo run doc",
"lint": "turbo run lint",
"format": "prettier --write \"**/*.{ts,tsx,js,jsx,md,css,scss}\"",
"preinstall": "echo setup"
"preinstall": "node -e \"require('child_process').spawn('bash', ['./preinstall.sh'], { stdio: 'inherit'})\""
},
"devDependencies": {
"@changesets/cli": "^2.27.1",
Expand All @@ -17,5 +17,5 @@
"turbo": "^1.12.4"
},
"packageManager": "[email protected]",
"name": "turborepo-template"
"name": "nthul"
}
5 changes: 3 additions & 2 deletions packages/shared-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
"name": "shared-ui",
"author": "Mayank Kumar Chaudhari <https://mayank-chaudhari.vercel.app>",
"private": true,
"version": "1.0.1",
"version": "0.0.0",
"description": "Shared UI Package",
"main": "./index.ts",
"types": "./index.ts",
"scripts": {
"lint": "eslint ."
},
"devDependencies": {
"@mayank1513/fork-me": "workspace:*",
"@mayank1513/fork-me": "latest",
"nthul": "workspace:*",
"@types/node": "^20.11.19",
"@types/react": "^18.2.56",
"@types/react-dom": "^18.2.19",
Expand Down
4 changes: 2 additions & 2 deletions packages/shared-ui/src/cards/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import { Card } from "./card";

const cards = [
{
href: "https://react18-tools.github.io/turborepo-template/",
href: "https://mayank1513.github.io/nthul/",
title: "Docs",
description: "Explore the official docs.",
},
{
href: "https://github.com/react18-tools/turborepo-template",
href: "https://github.com/mayank1513/nthul",
title: "More Examples",
description: "Explore more examples on official GitHub Repo.",
},
Expand Down
2 changes: 1 addition & 1 deletion packages/shared-ui/src/cards/star-me-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import styles from "./cards.module.css";

export function StarMeCard() {
return (
<StarMe className={styles.card} gitHubUrl="https://github.com/react18-tools/turborepo-template">
<StarMe className={styles.card} gitHubUrl="https://github.com/mayank1513/nthul">
<h2>
Star this repo <span>-&gt;</span>
</h2>
Expand Down
2 changes: 1 addition & 1 deletion packages/shared-ui/src/common/logo.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { HTMLProps } from "react";

export function Logo(props: HTMLProps<HTMLElement>) {
return <code {...props}>turborepo-template</code>;
return <code {...props}>nthul</code>;
}
2 changes: 1 addition & 1 deletion packages/shared-ui/src/root-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function SharedRootLayout({ children, className = "", ...props }: SharedR
<Footer />
<ForkMe
bgColor="var(--text-color)"
gitHubUrl="https://github.com/react18-tools/turborepo-template"
gitHubUrl="https://github.com/mayank1513/nthul"
textColor="var(--bg-color)"
/>
</>
Expand Down
64 changes: 0 additions & 64 deletions setup.sh

This file was deleted.

0 comments on commit d2ab91c

Please sign in to comment.