Skip to content

Commit 0fa7827

Browse files
authored
Initial commit
0 parents  commit 0fa7827

File tree

128 files changed

+4312
-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.

128 files changed

+4312
-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": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "restricted",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.github/FUNDING.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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+
patreon: # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
13+
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: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Update dependencies and Docs
2+
3+
on:
4+
push:
5+
branches: [main]
6+
schedule:
7+
- cron: "0 */8 * * *"
8+
jobs:
9+
generate-docs:
10+
if: github.event.repository.owner.login == 'react18-tools'
11+
runs-on: ubuntu-latest
12+
permissions:
13+
packages: write
14+
contents: write
15+
steps:
16+
- uses: actions/checkout@v3
17+
with:
18+
token: ${{ secrets.GITHUB_TOKEN }}
19+
20+
- uses: actions/setup-node@v3
21+
with:
22+
registry-url: https://registry.npmjs.org
23+
node-version: 20
24+
- run: npm i -g pnpm && pnpm i
25+
name: Install dependencies
26+
- name: Test
27+
run: npm test
28+
- run: git status && git clean -f -d && git status
29+
name: clean up working directory
30+
- run: npx @turbo/codemod update . && pnpm update --latest -w
31+
name: Update dependencies
32+
- run: pnpm build
33+
name: Build all apps to make sure it is not broken due to dependency upgrades
34+
- name: Run unit tests
35+
run: pnpm test
36+
- name: Generate/update docs
37+
run: pnpm doc
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+
- name: Save upgraded packages back to repo
45+
run: git add . && git commit -m "upgrade deps && docs" && git push origin main

.github/workflows/publish.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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/fork-me/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+
packages: write
17+
contents: write
18+
id-token: write
19+
20+
defaults:
21+
run:
22+
working-directory: ./lib/fork-me
23+
24+
steps:
25+
- uses: actions/checkout@v3
26+
with:
27+
token: ${{ secrets.GITHUB_TOKEN }}
28+
29+
- uses: actions/setup-node@v3
30+
with:
31+
node-version: 20
32+
registry-url: https://registry.npmjs.org
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+
- name: Create release and publish to NPM
39+
run: pnpm build && pnpm publish-package
40+
# continue on error to publish scoped package name <- by default repo is setup for a non-scoped + scoped package name
41+
continue-on-error: true
42+
env:
43+
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
44+
TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
OWNER: ${{ github.event.repository.owner.login }}
46+
REPO: ${{ github.event.repository.name }}
47+
48+
- name: Publish Scoped package to NPM
49+
# continue on error - expecing npm to trow error if scoping is done twice
50+
continue-on-error: true
51+
id: publish_scoped
52+
run: cd dist && node ../scope.js && npm publish --provenance --access public
53+
env:
54+
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
55+
TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
OWNER: ${{ github.event.repository.owner.login }}
57+
REPO: ${{ github.event.repository.name }}

.github/workflows/setup.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: setup repo
2+
3+
on:
4+
create:
5+
6+
jobs:
7+
setup:
8+
if: github.ref == 'refs/heads/main'
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write
12+
pull-requests: write
13+
steps:
14+
- uses: actions/checkout@v3
15+
with:
16+
token: ${{ secrets.GITHUB_TOKEN }}
17+
- name: Setup Git and create PR
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: chmod +x ./setup.sh && (sudo bash ./setup.sh ${{ github.event.repository.owner.login }} ${{ github.event.repository.name }} || ./setup.sh ${{ github.event.repository.owner.login }} ${{ github.event.repository.name }})
25+
- name: Push changes back to repo
26+
run: |
27+
git add .
28+
git commit -m 'Rebrand 💖 <a href="https://mayank-chaudhari.vercel.app" target="_blank">Mayank Kumar Chaudhari</a> [skip ci]'
29+
git push origin main

.github/workflows/test.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: test
2+
3+
on:
4+
push:
5+
pull_request:
6+
schedule:
7+
- cron: "5 */8 * * *"
8+
jobs:
9+
test:
10+
if: github.run_number != 1
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
steps:
15+
- uses: actions/checkout@v3
16+
- uses: actions/setup-node@v3
17+
with:
18+
node-version: 20
19+
- run: npm i -g pnpm && pnpm i
20+
name: Install dependencies
21+
- name: Run unit tests
22+
run: pnpm test
23+
- name: Upload coverage reports to Codecov
24+
continue-on-error: true
25+
uses: codecov/codecov-action@v3
26+
with:
27+
directory: ./lib/fork-me
28+
token: ${{ secrets.CODECOV_TOKEN }}
29+
flags: fork-me
30+
- uses: paambaati/[email protected]
31+
continue-on-error: true
32+
env:
33+
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
34+
with:
35+
coverageLocations: ./lib/fork-me/coverage/*.xml:clover

.gitignore

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
node_modules
5+
.pnp
6+
.pnp.js
7+
8+
# testing
9+
coverage
10+
11+
# next.js
12+
.next/
13+
out/
14+
build
15+
16+
# misc
17+
.DS_Store
18+
*.pem
19+
20+
# debug
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*
24+
25+
# local env files
26+
.env
27+
.env.local
28+
.env.development.local
29+
.env.test.local
30+
.env.production.local
31+
32+
# turbo
33+
.turbo
34+
35+
# vercel
36+
.vercel
37+
38+
# lock files
39+
*lock*

0 commit comments

Comments
 (0)