Skip to content

Commit a749ab9

Browse files
authored
Merge pull request #7 from react18-tools/touchup
Touchup
2 parents fa4b19e + ffef8e1 commit a749ab9

File tree

20 files changed

+146
-87
lines changed

20 files changed

+146
-87
lines changed

.deepsource.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
version = 1

.github/workflows/publish.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,15 @@ jobs:
4343
OWNER: ${{ github.event.repository.owner.login }}
4444
REPO: ${{ github.event.repository.name }}
4545

46+
- name: Publish package with long name for better SEO
47+
continue-on-error: true
48+
run: |
49+
cd dist
50+
sed -i -e "s/.*name.*/\t\"name\": \"nextjs-themes-ultra\",/" package.json
51+
npm publish --provenance --access public
52+
env:
53+
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
54+
4655
# Publish lite version
4756
- run: node lite.js && pnpm build && pnpm publish-package && node scope.js && pnpm publish-package
4857
env:
@@ -52,7 +61,7 @@ jobs:
5261
continue-on-error: true
5362
run: |
5463
cd dist
55-
sed -i -e "s/.*name.*/\t\"name\": \"nextjs-themes-ultralight\",/" package.json
64+
sed -i -e "s/.*name.*/\t\"name\": \"nextjs-themes-ultralite\",/" package.json
5665
npm publish --provenance --access public
5766
env:
5867
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

.tkb

Lines changed: 15 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,47 @@
11
{
22
"scope": "Workspace",
33
"tasks": {
4-
"task-ZJpp-dpxx3KxRMsAPNuMC": {
5-
"id": "task-ZJpp-dpxx3KxRMsAPNuMC",
6-
"description": "Implement tests",
7-
"columnId": "column-done"
8-
},
9-
"4CTOhRPjKrEAW5AHYsV7P": {
10-
"id": "4CTOhRPjKrEAW5AHYsV7P",
11-
"description": "Update doc comments",
12-
"columnId": "column-done"
13-
},
14-
"RtA7NBfPOlfnVHqk54rMD": {
15-
"id": "RtA7NBfPOlfnVHqk54rMD",
16-
"description": "update readme",
17-
"columnId": "column-done"
18-
},
19-
"fqhes_YS14GQopOUs7K-7": {
20-
"id": "fqhes_YS14GQopOUs7K-7",
21-
"description": "update workflows to replace mayank1513",
22-
"columnId": "column-done"
23-
},
244
"-FlzW8htLo-6jz5-ZqjEx": {
255
"id": "-FlzW8htLo-6jz5-ZqjEx",
266
"description": "update examples to showcase edge cases",
27-
"columnId": "column-doing"
7+
"columnId": "column-done"
288
},
299
"p1R-Q4atxMo-29mSa7mb6": {
3010
"id": "p1R-Q4atxMo-29mSa7mb6",
3111
"description": "Remove scoped packages from turborepo-template",
32-
"columnId": "column-todo"
12+
"columnId": "column-done"
3313
},
34-
"a7ksr41sN7kQNaH8Io-dV": {
35-
"id": "a7ksr41sN7kQNaH8Io-dV",
36-
"description": "Add support for css modules",
14+
"J1yONFe2BVs5GbQJj1SXG": {
15+
"id": "J1yONFe2BVs5GbQJj1SXG",
16+
"description": "Add ThemeContainer server component",
3717
"columnId": "column-done"
18+
},
19+
"G-1H47JpSI69kav1qZ-kp": {
20+
"id": "G-1H47JpSI69kav1qZ-kp",
21+
"description": "Test setting theme from useEffect without any delay",
22+
"columnId": "column-todo"
3823
}
3924
},
4025
"columns": [
4126
{
4227
"id": "column-todo",
4328
"title": "To do",
4429
"tasksIds": [
45-
"p1R-Q4atxMo-29mSa7mb6"
30+
"G-1H47JpSI69kav1qZ-kp"
4631
]
4732
},
4833
{
4934
"id": "column-doing",
5035
"title": "Doing",
51-
"tasksIds": [
52-
"-FlzW8htLo-6jz5-ZqjEx"
53-
]
36+
"tasksIds": []
5437
},
5538
{
5639
"id": "column-done",
5740
"title": "Done",
5841
"tasksIds": [
59-
"a7ksr41sN7kQNaH8Io-dV",
60-
"RtA7NBfPOlfnVHqk54rMD",
61-
"fqhes_YS14GQopOUs7K-7",
62-
"task-ZJpp-dpxx3KxRMsAPNuMC",
63-
"4CTOhRPjKrEAW5AHYsV7P"
42+
"J1yONFe2BVs5GbQJj1SXG",
43+
"p1R-Q4atxMo-29mSa7mb6",
44+
"-FlzW8htLo-6jz5-ZqjEx"
6445
]
6546
}
6647
]

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Nextjs-Themes-Ultralight
1+
# Nextjs-Themes-Ultra
22

3-
[![test](https://github.com/react18-tools/nextjs-themes-ultralight/actions/workflows/test.yml/badge.svg)](https://github.com/react18-tools/nextjs-themes-ultralight/actions/workflows/test.yml) [![Maintainability](https://api.codeclimate.com/v1/badges/85f6447e649201924a2c/maintainability)](https://codeclimate.com/github/react18-tools/nextjs-themes-ultralight/maintainability) [![codecov](https://codecov.io/gh/react18-tools/nextjs-themes-ultralight/graph/badge.svg)](https://codecov.io/gh/react18-tools/nextjs-themes-ultralight) [![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/)
3+
[![test](https://github.com/react18-tools/nextjs-themes-ultra/actions/workflows/test.yml/badge.svg)](https://github.com/react18-tools/nextjs-themes-ultra/actions/workflows/test.yml) [![Maintainability](https://api.codeclimate.com/v1/badges/85f6447e649201924a2c/maintainability)](https://codeclimate.com/github/react18-tools/nextjs-themes-ultra/maintainability) [![codecov](https://codecov.io/gh/react18-tools/nextjs-themes-ultra/graph/badge.svg)](https://codecov.io/gh/react18-tools/nextjs-themes-ultra) [![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/)
44

55
🤟 👉 [Unleash the Power of React Server Components](https://medium.com/javascript-in-plain-english/unleash-the-power-of-react-server-components-eb3fe7201231)
66

7-
> A canonical package with a longer and more descriptive name is also published - `nextjs-themes-ultralight`
7+
> A canonical package with a longer and more descriptive name is also published - `nextjs-themes-ultra`
88
99
## Motivation
1010

@@ -42,19 +42,19 @@ I will update the main library [`nextjs-themes`](https://github.com/react18-tool
4242

4343
✅ Manipulate theme via `useTheme` hook
4444

45-
✅ Documented with [Typedoc](https://react18-tools.github.io/nextjs-themes-ultralight) ([Docs](https://react18-tools.github.io/nextjs-themes-ultralight))
45+
✅ Documented with [Typedoc](https://react18-tools.github.io/nextjs-themes-ultra) ([Docs](https://react18-tools.github.io/nextjs-themes-ultra))
4646

4747
✅ Use combinations of `th-` and `dark` or `light` classes for dark/light variants of themes
4848

4949
✅ Automatically avoids storing cookies when not using the corresponding `ServerTarget`
5050

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

53-
> Feel free to [request](https://github.com/react18-tools/nextjs-themes-ultralight/issues/new?assignees=&labels=&projects=&template=feature_request.md&title=) or [discuss](https://github.com/react18-tools/nextjs-themes-ultralight/discussions) new features or [report bugs](https://github.com/react18-tools/nextjs-themes-ultralight/issues/new?assignees=&labels=&projects=&template=bug_report.md&title=).
53+
> Feel free to [request](https://github.com/react18-tools/nextjs-themes-ultra/issues/new?assignees=&labels=&projects=&template=feature_request.md&title=) or [discuss](https://github.com/react18-tools/nextjs-themes-ultra/discussions) new features or [report bugs](https://github.com/react18-tools/nextjs-themes-ultra/issues/new?assignees=&labels=&projects=&template=bug_report.md&title=).
5454
5555
## Install
5656

57-
> A canonical package with a longer and more descriptive name is also published - `nextjs-themes-ultralight`
57+
> A canonical package with a longer and more descriptive name is also published - `nextjs-themes-ultra`
5858
5959
```bash
6060
$ pnpm add nthul
@@ -167,7 +167,7 @@ An elegant color-switch to toggle coloe-schemes ("dark" | "light" | "system").
167167

168168
### HTML & CSS
169169

170-
That's it, your Next.js app fully supports dark mode, including System preference with `prefers-color-scheme`. The theme is also immediately synced between tabs. By default, `nextjs-themes-ultralight` modifies the className on the `html` element, which you can easily use to style your app:
170+
That's it, your Next.js app fully supports dark mode, including System preference with `prefers-color-scheme`. The theme is also immediately synced between tabs. By default, `nthul` modifies the className on the `html` element, which you can easily use to style your app:
171171

172172
```css
173173
:root {
@@ -210,7 +210,7 @@ That's it, your Next.js app fully supports dark mode, including System preferenc
210210
}
211211
```
212212

213-
Also see [Example CSS file](https://github.com/react18-tools/nextjs-themes-ultralight/blob/main/packages/shared-ui/src/globals.css)
213+
Also see [Example CSS file](https://github.com/react18-tools/nextjs-themes-ultra/blob/main/packages/shared-ui/src/globals.css).
214214

215215
#### When using `ServerTarget`
216216

@@ -328,7 +328,7 @@ export default function Page() {
328328
}
329329
```
330330

331-
> We are open to listening your feedback - [Discussions](https://github.com/react18-tools/nextjs-themes-ultralight/discussions)
331+
> We are open to listening your feedback - [Discussions](https://github.com/react18-tools/nextjs-themes-ultra/discussions)
332332
333333
### With Styled Components and any CSS-in-JS
334334

@@ -428,7 +428,7 @@ cd nthul
428428
pnpm dev
429429
```
430430

431-
### 🤩 Don't forger to start [this repo](https://github.com/react18-tools/nextjs-themes-ultralight)!
431+
### 🤩 Don't forger to start [this repo](https://github.com/react18-tools/nextjs-themes-ultra)!
432432

433433
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)
434434

examples/nextjs/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# nextjs-example
22

3+
## 0.0.3
4+
5+
### Patch Changes
6+
7+
- Updated dependencies
8+
9+
10+
311
## 0.0.2
412

513
### Patch Changes

examples/nextjs/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nextjs-example",
3-
"version": "0.0.2",
3+
"version": "0.0.3",
44
"private": true,
55
"scripts": {
66
"dev": "next dev",
@@ -19,8 +19,8 @@
1919
},
2020
"devDependencies": {
2121
"@next/eslint-plugin-next": "^14.1.0",
22-
"@types/node": "^20.11.20",
23-
"@types/react": "^18.2.58",
22+
"@types/node": "^20.11.21",
23+
"@types/react": "^18.2.60",
2424
"@types/react-dom": "^18.2.19",
2525
"eslint-config-custom": "workspace:*",
2626
"tsconfig": "workspace:*",

examples/vite/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# vite-example
22

3+
## 0.0.3
4+
5+
### Patch Changes
6+
7+
- Updated dependencies
8+
9+
10+
311
## 0.0.2
412

513
### Patch Changes

examples/vite/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vite-example",
33
"private": true,
4-
"version": "0.0.2",
4+
"version": "0.0.3",
55
"type": "module",
66
"scripts": {
77
"dev": "vite --port 3001",
@@ -17,12 +17,12 @@
1717
"shared-ui": "workspace:*"
1818
},
1919
"devDependencies": {
20-
"@types/react": "^18.2.58",
20+
"@types/react": "^18.2.60",
2121
"@types/react-dom": "^18.2.19",
22-
"@typescript-eslint/eslint-plugin": "^7.0.2",
23-
"@typescript-eslint/parser": "^7.0.2",
22+
"@typescript-eslint/eslint-plugin": "^7.1.0",
23+
"@typescript-eslint/parser": "^7.1.0",
2424
"@vitejs/plugin-react-swc": "^3.6.0",
25-
"eslint": "^8.56.0",
25+
"eslint": "^8.57.0",
2626
"eslint-plugin-react-hooks": "^4.6.0",
2727
"eslint-plugin-react-refresh": "^0.4.5",
2828
"typescript": "^5.3.3",

lib/nthul/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @mayank1513/fork-me
22

3+
## 0.2.0
4+
5+
### Minor Changes
6+
7+
- Add ForceTheme component for easily creating forced pages.
8+
Fix CSS Modules Support.
9+
310
## 0.1.0
411

512
### Minor Changes

lib/nthul/lite.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable no-undef -- ok*/
12
"use strict";
23

34
const fs = require("node:fs");
@@ -7,16 +8,17 @@ const packageJson = require(path.resolve(__dirname, "package.json"));
78

89
const ref = packageJson.name;
910
packageJson.peerDependencies.r18gs = "^0";
11+
delete packageJson.dependencies;
1012
packageJson.name = `${packageJson.name}-lite`;
1113

1214
fs.writeFileSync(path.resolve(__dirname, "package.json"), JSON.stringify(packageJson, null, 2));
1315

1416
const readMePath = path.resolve(__dirname, "..", "..", "README.md");
1517
let readMe = fs.readFileSync(readMePath, { encoding: "utf8" });
16-
const tmp = "!--|--!";
17-
const owner = process.env.OWNER;
18-
readMe = readMe.replace(new RegExp(`$${owner}/${ref}`, "g"), tmp);
18+
const tmp = "!---!";
19+
const owner = "react18-tools";
20+
readMe = readMe.replace(new RegExp(`${owner}/${ref}`, "g"), tmp);
1921
readMe = readMe.replace(new RegExp(ref, "g"), packageJson.name);
20-
readMe = readMe.replace(new RegExp(tmp, "g"), `$${owner}/${ref}`);
21-
readMe = readMe.replace(/## Want Lite Version(.|\n|\r)*You need r18gs as a peer-dependency/m, "");
22+
readMe = readMe.replace(new RegExp(tmp, "g"), `${owner}/${ref}`);
23+
readMe = readMe.replace(/## Want Lite Version(?:.|\n|\r)*You need r18gs as a peer-dependency/m, "");
2224
fs.writeFileSync(readMePath, readMe);

0 commit comments

Comments
 (0)