Skip to content

Commit 71530f9

Browse files
committed
feat(create-rslib): react template
1 parent 0f28206 commit 71530f9

File tree

164 files changed

+3036
-128
lines changed

Some content is hidden

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

164 files changed

+3036
-128
lines changed

.github/ISSUE_TEMPLATE/1-bug-report.en-US.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
name: "🐞 Bug Report"
1+
name: '🐞 Bug Report'
22
description: Report a Bug to Rslib
3-
title: "[Bug]: "
4-
labels: ["🐞 bug"]
3+
title: '[Bug]: '
4+
labels: ['🐞 bug']
55
body:
66
- type: markdown
77
attributes:
@@ -37,7 +37,7 @@ body:
3737
id: repro
3838
attributes:
3939
label: Reproduce link
40-
description: "Please provide a simplest reproduction of the problem (minimal demo without redundant dependencies). You can create it on CodePen ([<kbd>⌘</kbd>Click here to open the template](https://codepen.io/Justineo/pen/yLbxxOR)), or provide the URL of the project:"
40+
description: 'Please provide a simplest reproduction of the problem (minimal demo without redundant dependencies). You can create it on CodePen ([<kbd>⌘</kbd>Click here to open the template](https://codepen.io/Justineo/pen/yLbxxOR)), or provide the URL of the project:'
4141
placeholder: paste link here
4242
validations:
4343
required: true

.github/ISSUE_TEMPLATE/2-feature-request.en-US.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
name: "💡 Feature Request"
1+
name: '💡 Feature Request'
22
description: Submit a new feature request to Rslib
3-
title: "[Feature]: "
4-
labels: ["💡 feature"]
3+
title: '[Feature]: '
4+
labels: ['💡 feature']
55
body:
66
- type: markdown
77
attributes:

.github/workflows/pr-label.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
steps:
1515
- uses: github/[email protected]
1616
with:
17-
repo-token: "${{ secrets.GITHUB_TOKEN }}"
17+
repo-token: '${{ secrets.GITHUB_TOKEN }}'
1818
configuration-path: .github/pr-labeler.yml
1919
enable-versioned-regex: 0
2020
include-title: 1

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v18.20.2
1+
v22.10.0

package.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
"changeset": "changeset",
99
"check-dependency-version": "check-dependency-version-consistency .",
1010
"check-spell": "pnpx cspell",
11+
"format": "prettier . --write && biome check --write",
1112
"generate-release-pr": "zx scripts/generateReleasePr.mjs",
12-
"lint": "biome check . --diagnostic-level=warn && pnpm run check-spell",
13+
"lint": "biome check . --diagnostic-level=warn && prettier . --check && pnpm run check-spell",
1314
"prebundle": "nx run-many -t prebundle",
1415
"prepare": "pnpm run build && simple-git-hooks",
1516
"sort-package-json": "npx sort-package-json \"packages/*/package.json\"",
@@ -32,14 +33,17 @@
3233
"*.{js,jsx,ts,tsx,mjs,cjs}": [
3334
"biome check --write"
3435
],
35-
"package.json": "pnpm run check-dependency-version",
36+
"package.json": [
37+
"pnpm run check-dependency-version",
38+
"prettier --write"
39+
],
3640
"pnpm-lock.yaml": "pnpm dedupe --check"
3741
},
3842
"devDependencies": {
3943
"@biomejs/biome": "^1.9.4",
4044
"@changesets/cli": "^2.27.9",
4145
"@types/fs-extra": "^11.0.4",
42-
"@types/node": "~18.19.39",
46+
"@types/node": "^22.8.1",
4347
"check-dependency-version-consistency": "^4.1.0",
4448
"cross-env": "^7.0.3",
4549
"cspell-ban-words": "^0.0.4",
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "rslib-node-dual-js",
3+
"version": "0.0.0",
4+
"type": "module",
5+
"exports": {
6+
".": {
7+
"import": "./dist/index.js",
8+
"require": "./dist/index.cjs"
9+
}
10+
},
11+
"main": "./dist/index.cjs",
12+
"module": "./dist/index.js",
13+
"files": [
14+
"dist"
15+
],
16+
"scripts": {
17+
"build": "rslib build",
18+
"dev": "rslib build --watch"
19+
},
20+
"devDependencies": {
21+
"@rslib/core": "workspace:*",
22+
"typescript": "^5.6.3"
23+
}
24+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const squared = (n) => n * n;

packages/create-rslib/template-node-esm-ts/tsconfig.json renamed to packages/create-rslib/fragments/base/node-dual-js/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"compilerOptions": {
3-
"target": "ES2021",
4-
"lib": ["DOM", "ES2021"],
3+
"lib": ["ES2021"],
54
"module": "ESNext",
65
"noEmit": true,
76
"strict": true,
7+
"allowJs": true,
88
"skipLibCheck": true,
99
"isolatedModules": true,
1010
"resolveJsonModule": true,

0 commit comments

Comments
 (0)