Skip to content

Commit c0fcf0a

Browse files
authored
Initial commit
0 parents  commit c0fcf0a

File tree

214 files changed

+17569
-0
lines changed

Some content is hidden

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

214 files changed

+17569
-0
lines changed

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": ["@changesets/cli/commit", { "skipCI": false }],
5+
"fixed": [],
6+
"linked": [],
7+
"access": "public",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": ["@example/*"]
11+
}

.deepsource.toml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
version = 1
2+
3+
test_patterns = ["**/*.test.*"]
4+
5+
exclude_patterns = [
6+
"docs/**",
7+
"**/*.test.*"
8+
]
9+
10+
[[analyzers]]
11+
name = "javascript"
12+
13+
[analyzers.meta]
14+
plugins = ["react"]
15+
environment = [
16+
"nodejs",
17+
"vitest",
18+
"browser"
19+
]
20+
21+
[[transformers]]
22+
name = "prettier"

.github/FUNDING.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# These are supported funding model platforms
2+
3+
github: [mayank1513] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4+
polar: mayank1513
5+
patreon: # Replace with a single Patreon username
6+
open_collective: # Replace with a single Open Collective username
7+
ko_fi: # Replace with a single Ko-fi username
8+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
9+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
10+
liberapay: # Replace with a single Liberapay username
11+
issuehunt: # Replace with a single IssueHunt username
12+
otechie: # Replace with a single Otechie username
13+
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
14+
custom: [https://pages.razorpay.com/mayank1513] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ""
5+
labels: ""
6+
assignees: ""
7+
---
8+
9+
**Describe the bug**
10+
A clear and concise description of what the bug is.
11+
12+
**To Reproduce**
13+
Steps to reproduce the behavior:
14+
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
28+
- OS: [e.g. iOS]
29+
- Browser [e.g. chrome, safari]
30+
- Version [e.g. 22]
31+
32+
**Smartphone (please complete the following information):**
33+
34+
- Device: [e.g. iPhone6]
35+
- OS: [e.g. iOS8.1]
36+
- Browser [e.g. stock browser, safari]
37+
- Version [e.g. 22]
38+
39+
**Additional context**
40+
Add any other context about the problem here.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ""
5+
labels: ""
6+
assignees: ""
7+
---
8+
9+
**Is your feature request related to a problem? Please describe.**
10+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
11+
12+
**Describe the solution you'd like**
13+
A clear and concise description of what you want to happen.
14+
15+
**Describe alternatives you've considered**
16+
A clear and concise description of any alternative solutions or features you've considered.
17+
18+
**Additional context**
19+
Add any other context or screenshots about the feature request here.

.github/workflows/docs.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Generate Docs
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
jobs:
9+
generate-docs:
10+
if: github.run_number != 1 && github.event.repository.owner.login == 'react18-tools'
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
token: ${{ secrets.GITHUB_TOKEN }}
18+
ref: ${{ github.event.before }}
19+
20+
- name: Check if package.json was modified
21+
id: pub
22+
run: |
23+
git fetch origin main && git checkout main
24+
if git diff --name-only ${{ github.event.before }} HEAD | grep -q "lib/package.json"; then
25+
echo "file_changed=true" >> $GITHUB_ENV
26+
else
27+
echo "file_changed=false" >> $GITHUB_ENV
28+
fi
29+
30+
- name: Exit early if lib/package.json was modified
31+
if: env.file_changed == 'true'
32+
run: exit 1
33+
34+
- uses: actions/setup-node@v4
35+
with:
36+
registry-url: https://registry.npmjs.org
37+
node-version: 20
38+
- name: Setup Git
39+
run: |
40+
git config --global user.name "mayank1513"
41+
git config --global user.email "[email protected]"
42+
git fetch
43+
git checkout main
44+
git pull
45+
- run: npm i -g pnpm && pnpm i --no-frozen-lockfile
46+
name: Install dependencies
47+
- run: git stash --include-untracked
48+
name: clean up working directory
49+
- name: Generate/update docs
50+
run: |
51+
pnpm doc && pnpm format
52+
echo "$(git rev-parse HEAD)" > .turborepo-template.lst
53+
- name: Save docs back to repo
54+
run: git add . && git commit -m "upgrade deps && docs [skip ci]" && git push origin main
55+
- name: Update website
56+
continue-on-error: true
57+
run: |
58+
gh api \
59+
--method POST \
60+
-H "Accept: application/vnd.github+json" \
61+
-H "X-GitHub-Api-Version: 2022-11-28" \
62+
/repos/mayank1513/turborepo-template/merge-upstream \
63+
-f "branch=main"
64+
env:
65+
GH_TOKEN: ${{ secrets.mayank1513PAT }}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Manually publish to NPM - Apply changeset in the workflow.
2+
3+
# publish only when package json has changed - assuming version upgrade
4+
on:
5+
workflow_dispatch:
6+
7+
jobs:
8+
publish:
9+
if: github.event.repository.owner.login == 'react18-tools'
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
id-token: write
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
token: ${{ secrets.GITHUB_TOKEN }}
19+
20+
- uses: actions/setup-node@v4
21+
with:
22+
node-version: 20
23+
registry-url: https://registry.npmjs.org
24+
- name: Setup Git
25+
run: |
26+
git config --global user.name "mayank1513"
27+
git config --global user.email "[email protected]"
28+
- run: npm i -g pnpm && pnpm i
29+
name: Install dependencies
30+
# fail and not publish if any of the unit tests are failing
31+
- name: Test
32+
run: pnpm test
33+
working-directory: ./lib
34+
- name: clean up working directory
35+
run: git status && git clean -f -d && git status
36+
# - name: Copy Readme file
37+
# run: cp ./README.md ./lib # todo: uncomment this line while rebranding
38+
- name: Apply changesets, publish and create release, branches and tags
39+
run: node ./scripts/manual-publish.js
40+
env:
41+
BRANCH: ${{ github.ref_name }}
42+
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
43+
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
44+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/publish.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Publish to NPM
2+
3+
# publish only when package json has changed - assuming version upgrade
4+
on:
5+
push:
6+
branches: [main]
7+
paths: "lib/package.json"
8+
9+
jobs:
10+
publish:
11+
# Don't run just after creating repo from template
12+
# Also avoid running after merging set-up PR
13+
if: github.run_number > 2 && github.event.repository.owner.login == 'react18-tools'
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: write
17+
id-token: write
18+
actions: write
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
with:
23+
token: ${{ secrets.GITHUB_TOKEN }}
24+
25+
- uses: actions/setup-node@v4
26+
with:
27+
node-version: 20
28+
registry-url: https://registry.npmjs.org
29+
- name: Setup Git
30+
run: |
31+
git config --global user.name "mayank1513"
32+
git config --global user.email "[email protected]"
33+
- run: npm i -g pnpm && pnpm i
34+
name: Install dependencies
35+
# fail and not publish if any of the unit tests are failing
36+
- name: Test
37+
run: pnpm test
38+
working-directory: ./lib
39+
# - name: Copy Readme file
40+
# run: cp ./README.md ./lib # will be uncommented while rebranding
41+
- name: Apply changesets, publish and create release, branches and tags
42+
run: node ./scripts/publish.js
43+
env:
44+
BRANCH: ${{ github.ref_name }}
45+
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
46+
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
47+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
token: ${{ secrets.GITHUB_TOKEN }}
49+
- name: Run docs workflow as it will fail when trying to make parallel updates
50+
run: gh workflow run docs.yml
51+
env:
52+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/setup.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: setup repo
2+
3+
on:
4+
create:
5+
workflow_dispatch:
6+
7+
jobs:
8+
setup:
9+
if: github.ref == 'refs/heads/main'
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
token: ${{ secrets.GITHUB_TOKEN }}
17+
- name: Setup Git
18+
run: |
19+
git config --global user.name "Mayank Chaudhari<https://mayank-chaudhari.vercel.app>"
20+
git config --global user.email "[email protected]"
21+
git fetch
22+
git checkout main
23+
- name: Set up repo
24+
run: |
25+
git rm .tkb
26+
mv ./scripts/.tkb ./.tkb
27+
rm -rf ./docs
28+
- name: Push changes back to repo
29+
run: |
30+
git add .
31+
git commit -m 'Craete rebrand config 💖 <a href="https://mayank-chaudhari.vercel.app" target="_blank">Mayank Kumar Chaudhari</a> [skip ci]'
32+
git push origin main

0 commit comments

Comments
 (0)