Skip to content

Commit 969423a

Browse files
committed
Rebrand 💖 <a href=https://mayank-chaudhari.vercel.app target=_blank>Mayank Kumar Chaudhari</a> [skip ci]
1 parent c421522 commit 969423a

Some content is hidden

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

57 files changed

+323
-902
lines changed

‎.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These are supported funding model platforms
22

3-
github: [mayank1513] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
3+
github: [react18-tools, mayank1513] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
44
polar: mayank1513
55
patreon: # Replace with a single Patreon username
66
open_collective: # Replace with a single Open Collective username

‎.github/workflows/manual-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ jobs:
3232
run: pnpm test
3333
- name: clean up working directory
3434
run: git status && git clean -f -d && git status
35-
# - name: Copy Readme file
36-
# run: cp ./README.md ./lib # todo: uncomment this line while rebranding
35+
- name: Copy Readme file
36+
run: cp ./README.md ./lib # todo: uncomment this line while rebranding
3737
- name: Apply changesets, publish and create release, branches and tags
3838
run: node ./scripts/manual-publish.js
3939
env:

‎.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ jobs:
3434
# fail and not publish if any of the unit tests are failing
3535
- name: Test
3636
run: pnpm test
37-
# - name: Copy Readme file
38-
# run: cp ./README.md ./lib # will be uncommented while rebranding
37+
- name: Copy Readme file
38+
run: cp ./README.md ./lib # will be uncommented while rebranding
3939
- name: Apply changesets, publish and create release, branches and tags
4040
run: node ./scripts/publish.js
4141
env:

‎.github/workflows/setup.yml

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

‎.tkb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828
},
2929
"RX4J5v4y5IOe_ucf8pMRT": {
3030
"id": "RX4J5v4y5IOe_ucf8pMRT",
31-
"description": "🌟 Enable [private vulnerability reporting] (For public repo - do this after updating visibility to public)",
31+
"description": "🌟 Enable [private vulnerability reporting](https://github.com/react18-tools/react-markdown-autolink/security) (For public repo - do this after updating visibility to public)",
3232
"columnId": "column-todo"
3333
},
3434
"EdPbrbJLllUHfZmCS80f7": {
3535
"id": "EdPbrbJLllUHfZmCS80f7",
36-
"description": "Set up `CodeCov`\n - Visit Codecov and set up your repo\n - Create [repository secret] for `CODECOV_TOKEN`",
36+
"description": "Set up `CodeCov`\n - Visit Codecov and set up your repo\n - Create [repository secret]((https://github.com/react18-tools/react-markdown-autolink/settings/secrets/actions)) for `CODECOV_TOKEN`",
3737
"columnId": "column-todo"
3838
},
3939
"MLLUsAhCKaKxvEXFY0HSq": {
@@ -68,7 +68,7 @@
6868
},
6969
"5vS1JNXoMhDl5IBljwh2v": {
7070
"id": "5vS1JNXoMhDl5IBljwh2v",
71-
"description": "Set up GitHub pages to deploy docs\n - Go to [repo settings] -> pages (On the left panel); Select deploy from a branch; Then Select `main` and `/docs`",
71+
"description": "Set up GitHub pages to deploy docs\n - Go to [repo settings](https://github.com/react18-tools/react-markdown-autolink/settings/pages) -> pages (On the left panel); Select deploy from a branch; Then Select `main` and `/docs`",
7272
"columnId": "column-todo"
7373
},
7474
"55DAZwduwTvlaxaJC8hlX": {

‎README.md

Lines changed: 88 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,131 @@
1-
# Turborepo Template <img src="https://github.com/react18-tools/turborepo-template/blob/main/popper.png?raw=true" style="height: 40px"/>
1+
# React Markdown Autolink <img src="https://github.com/react18-tools/react-markdown-autolink/blob/main/popper.png?raw=true" style="height: 40px"/>
22

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

5-
> [Explore featured packages built with this template.](./FEATURED.md)
5+
React Markdown Autolink is a comprehensive library designed to unlock the full potential of React 18 server components. It provides customizable loading animation components and a fullscreen loader container, seamlessly integrating with React and Next.js.
66

7-
> Exciting news! We've launched a new course to help you master this template: [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)
7+
✅ Fully Treeshakable (import from `react-markdown-autolink/client/loader-container`)
88

9-
<details>
10-
<summary style="cursor:pointer"><h2 style="display:inline-block">Features</h2></summary>
9+
✅ Fully TypeScript Supported
1110

12-
This template offers the following pre-configured features. Additionally, your repository will automatically be rebranded with the help of workflows and post-install scripts.
11+
✅ Leverages the power of React 18 Server components
1312

14-
✅ Monorepo powered by Turborepo and GitHub actions for automating building, testing, and deploying your library
13+
✅ Compatible with all React 18 build systems/tools/frameworks
1514

16-
✅ Examples with Next.js, Vite, and Remix to showcase how your library can be utilized (Note: Remix is optional due to instability in monorepo setup and folder imports)
15+
✅ Documented with [Typedoc](https://react18-tools.github.io/react-markdown-autolink) ([Docs](https://react18-tools.github.io/react-markdown-autolink))
1716

18-
✅ Examples pre-configured for Light/Dark theme based on user preference
17+
✅ Examples for Next.js, Vite, and Remix
1918

20-
✅ Examples ready to be deployed to Vercel
19+
> <img src="https://github.com/react18-tools/react-markdown-autolink/blob/main/popper.png?raw=true" style="height: 20px"/> Please consider starring [this repository](https://github.com/react18-tools/react-markdown-autolink) and sharing it with your friends.
2120
22-
✅ Typedoc setup for automatic documentation generation based on tsdoc comments
21+
## Getting Started
2322

24-
✅ Code of Conduct and contributing files, ready for customization
23+
### Installation
2524

26-
✅ Prettier and linter configured according to modern best practices (Feel free to add your flavor)
25+
```bash
26+
$ pnpm add react-markdown-autolink
27+
```
2728

28-
✅ Recommended VSCode extensions - Prettier and [Kanban board](https://github.com/mayank1513/vscode-extension-trello-kanban-board) for code formatting and project management directly within your IDE
29+
**_or_**
2930

30-
✅ Powerful code generators - try `yarn plop`
31+
```bash
32+
$ npm install react-markdown-autolink
33+
```
3134

32-
✅ Test setup with Vitest - A modern and fast testing framework supporting Jest-like APIs
35+
**_or_**
3336

34-
✅ Workflows to automate testing on every pull-request or code push event
37+
```bash
38+
$ yarn add react-markdown-autolink
39+
```
3540

36-
✅ Workflow to automatically publish and create GitHub releases when you update your library's `package.json` file.
41+
## Want Lite Version? [![npm bundle size](https://img.shields.io/bundlephobia/minzip/react-markdown-autolink-lite)](https://www.npmjs.com/package/react-markdown-autolink-lite) [![Version](https://img.shields.io/npm/v/react-markdown-autolink-lite.svg?colorB=green)](https://www.npmjs.com/package/react-markdown-autolink-lite) [![Downloads](https://img.jsdelivr.com/img.shields.io/npm/d18m/react-markdown-autolink-lite.svg)](https://www.npmjs.com/package/react-markdown-autolink-lite)
3742

38-
✅ Workflow to automatically rebrand the entire template based on your repository name. (Refer [TODO.md](./TODO.md))
43+
```bash
44+
$ pnpm add react-markdown-autolink-lite
45+
```
3946

40-
✅ Plus, this readme file includes a quick checklist for configuring Codecov and other badges, setting up your docs website on GitHub pages, and more. See [Checklist](./TODO.md).
47+
**or**
4148

42-
### Creates a library that is
49+
```bash
50+
$ npm install react-markdown-autolink-lite
51+
```
4352

44-
✅ Fully Treeshakable (e.g., import {Bars1, Bars2} from `react18-loaders/dist/server/bars`)
53+
**or**
4554

46-
✅ Fully TypeScript Supported
55+
```bash
56+
$ yarn add react-markdown-autolink-lite
57+
```
4758

48-
✅ Leverages the power of React 18 Server components
59+
> You need `r18gs` as a peer-dependency
4960
50-
✅ Compatible with all React 18 build systems/tools/frameworks
61+
### Import Styles
5162

52-
✅ Documented with [Typedoc](https://react18-tools.github.io/turborepo-template) ([Docs](https://react18-tools.github.io/turborepo-template))
63+
You can import styles globally or within specific components.
5364

54-
</details>
65+
```css
66+
/* globals.css */
67+
@import "react-markdown-autolink/dist";
68+
```
5569

56-
## Getting Started:
70+
```tsx
71+
// layout.tsx
72+
import "react-markdown-autolink/dist/index.css";
73+
```
5774

58-
This template is based on one of the official Turbo Repo starters but comes with a plethora of additional features specifically designed for developing and publishing JavaScript/TypeScript libraries, especially for React 18.
75+
For selective imports:
5976

60-
To get started, simply click on the `"Use this template"` button to create a new repository based on this template, \*\*update [`sripts/rebrand.config.json`](./scripts/rebrand.config.json) if required, and install dependencies(Will automatically trigger rebrand.js). Customize it according to your requirements for your next JavaScript/TypeScript/React/Next.js library or project.
77+
```css
78+
/* globals.css */
79+
@import "react-markdown-autolink/dist/client"; /** required if you are using LoaderContainer */
80+
@import "react-markdown-autolink/dist/server/bars/bars1";
81+
```
6182

62-
For detailed instructions and a checklist, please refer to [TODO.md](./TODO.md).
83+
### Usage
6384

64-
## What's Different from Turborepo official templates?
85+
Using loaders is straightforward.
6586

66-
Compared to the default scaffold from create-turbo, this template offers:
87+
```tsx
88+
import { Bars1 } from "react-markdown-autolink/dist/server/bars/bars1";
6789

68-
- Unit tests with `vitest`
69-
- Build setup with `tsup` and `esbuild-plugin-react18` that supports React Server components out of the box
70-
- **Automatic file generation**
71-
- Simply run `yarn plop` and follow the prompts to auto-generate your new component with test files and dependency linking, adhering to best practices automatically
72-
- GitHub actions/workflows to auto-publish your package when the version changes
73-
- GitHub action/workflow + pre-install scripts to automatically rebrand your repo on creation
90+
export default function MyComponent() {
91+
return someCondition ? <Bars1 /> : <>Something else...</>;
92+
}
93+
```
7494

75-
### 🤩 Don't forget to star [this repository](https://github.com/react18-tools/turborepo-template)!
95+
For detailed API and options, refer to [the API documentation](https://react18-tools.github.io/react-markdown-autolink).
7696

77-
Looking for a hands-on course to get 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 TypeScript](https://www.udemy.com/course/game-of-chess-with-nextjs-react-and-typescript/?referralCode=851A28F10B254A8523FE)
97+
**Using LoaderContainer**
7898

79-
![Repo Stats](https://repobeats.axiom.co/api/embed/2ef1a24385037998386148afe5a98ded6006f410.svg "Repobeats analytics image")
99+
`LoaderContainer` is a fullscreen component. You can add this component directly in your layout and then use `useLoader` hook to toggle its visibility.
100+
101+
```tsx
102+
// layout.tsx
103+
<LoaderContainer />
104+
...
105+
```
106+
107+
```tsx
108+
// some other page or component
109+
import { useLoader } from "react-markdown-autolink/dist/hooks";
110+
111+
export default MyComponent() {
112+
const { setLoading } = useLoader();
113+
useCallback(()=>{
114+
setLoading(true);
115+
...do some work
116+
setLoading(false);
117+
}, [])
118+
...
119+
}
120+
```
80121

81122
## License
82123

83-
Licensed under the MPL-2.0 open-source license.
124+
This library is licensed under the MPL-2.0 open-source license.
125+
126+
84127

85-
> <img src="https://github.com/react18-tools/turborepo-template/blob/main/popper.png?raw=true" style="height: 20px"/> Please consider enrolling in [our courses](https://mayank-chaudhari.vercel.app/courses) or [sponsoring](https://github.com/sponsors/mayank1513) our work.
128+
> <img src="https://github.com/react18-tools/react-markdown-autolink/blob/main/popper.png?raw=true" style="height: 20px"/> Please consider enrolling in [our courses](https://mayank-chaudhari.vercel.app/courses) or [sponsoring](https://github.com/sponsors/mayank1513) our work.
86129

87130
<hr />
88131

‎SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ Note: We only accept pull requests addressing security vulnerabilities. Addition
2020

2121
## Reporting Vulnerabilities
2222

23-
Kindly report vulnerabilities [here](https://github.com/react18-tools/turborepo-template/security/advisories/new).
23+
Kindly report vulnerabilities [here](https://github.com/react18-tools/react-markdown-autolink/security/advisories/new).

‎TODO.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Step-by-Step Instructions and Checklist
22

33
- [ ] Star [this repository](https://github.com/react18-tools/turborepo-template/) for easy access and to show your support
4-
- [ ] Create a new GitHub repository using this template.
4+
- [x] Create a new GitHub repository using this template.
55
- Click the `Use this template` button at the top right -> `Create a new repository`
66
- Click `Create repository` and wait for the setup workflow to finish rebranding your repo.
77
- [ ] Install and set up Node.js and your IDE (VSCode recommended)
@@ -14,10 +14,10 @@
1414
- Run `pnpm i` to install dependencies; the `rebrand` script will automatically rebrand the repo, adjust workflows, and create a commit
1515
- [ ] Make sure you run `node scripts/rebrand.js` from the root directory to rebrand your repo.
1616
- [ ] Run `yarn plop`, and follow prompts to generate server or client components for your library
17-
- [ ] 🌟 Enable [private vulnerability reporting]
17+
- [ ] 🌟 Enable [private vulnerability reporting](https://github.com/react18-tools/react-markdown-autolink/security)
1818
- [ ] Set up `CodeCov`
1919
- Visit Codecov and set up your repo
20-
- Create [repository secret] for `CODECOV_TOKEN`
20+
- Create [repository secret]((https://github.com/react18-tools/react-markdown-autolink/settings/secrets/actions)) for `CODECOV_TOKEN`
2121
- [ ] Set up `CodeClimate`
2222
- Visit CodeClimate and set up your repo
2323
- Create [repository secret] for `CC_TEST_REPORTER_ID`
@@ -31,7 +31,7 @@
3131
- [ ] Create your library and update examples
3232
- [ ] Update README as required
3333
- [ ] Set up GitHub pages to deploy docs
34-
- Go to [repo settings] -> pages (On the left panel); Select deploy from a branch; Then Select `main` and `/docs`
34+
- Go to [repo settings](https://github.com/react18-tools/react-markdown-autolink/settings/pages) -> pages (On the left panel); Select deploy from a branch; Then Select `main` and `/docs`
3535
- [ ] (Optional) Set up [Deepsource](https://app.deepsource.com/login) for static code analysis
3636
- [ ] Push your changes/Create PR and see your library being automatically tested and published
3737
- [ ] Optionally deploy your examples to Vercel.

‎examples/express/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@
3737
"tsup": "^8.1.0",
3838
"typescript": "^5.5.3"
3939
}
40-
}
40+
}

‎examples/nextjs/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@
1818
"react": "^18.3.1",
1919
"react-dom": "^18.3.1",
2020
"react-mouse-trails": "^0.0.4",
21-
"react18-loaders": "workspace:*",
22-
"webgl-generative-particles": "^0.0.1"
21+
"react18-loaders": "latest",
22+
"webgl-generative-particles": "^0.0.1",
23+
"react-markdown-autolink": "workspace:*"
2324
},
2425
"devDependencies": {
2526
"@next/eslint-plugin-next": "^14.2.5",
@@ -30,4 +31,4 @@
3031
"@types/react-dom": "^18.3.0",
3132
"typescript": "^5.5.3"
3233
}
33-
}
34+
}

‎examples/nextjs/src/app/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { LandingPage } from "@repo/shared/dist/server";
33
import { Demo } from "@repo/shared";
44

55
export const metadata = {
6-
title: "React 18 Loaders",
6+
title: "React Markdown Autolink",
77
};
88

99
/** next.js landing page */

‎examples/remix/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@
2020
"nextjs-darkmode": "^1.0.4",
2121
"react": "^18.3.1",
2222
"react-dom": "^18.3.1",
23-
"react18-loaders": "workspace:*",
24-
"react18-themes": "^3.2.0"
23+
"react18-loaders": "latest",
24+
"react18-themes": "^3.2.0",
25+
"react-markdown-autolink": "workspace:*"
2526
},
2627
"devDependencies": {
2728
"@remix-run/dev": "^2.10.2",
@@ -34,4 +35,4 @@
3435
"engines": {
3536
"node": ">=18"
3637
}
37-
}
38+
}

‎examples/vite/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@
1616
"react": "^18.3.1",
1717
"react-dom": "^18.3.1",
1818
"react-mouse-trails": "^0.0.4",
19-
"react18-loaders": "workspace:*",
20-
"react18-themes": "^3.2.0"
19+
"react18-loaders": "latest",
20+
"react18-themes": "^3.2.0",
21+
"react-markdown-autolink": "workspace:*"
2122
},
2223
"devDependencies": {
2324
"@repo/eslint-config": "workspace:*",
@@ -28,4 +29,4 @@
2829
"typescript": "^5.5.3",
2930
"vite": "^5.3.3"
3031
}
31-
}
32+
}

0 commit comments

Comments
 (0)