Skip to content

Commit 180ebeb

Browse files
committed
fix package name
1 parent 0edd82e commit 180ebeb

File tree

5 files changed

+42
-50
lines changed

5 files changed

+42
-50
lines changed

.github/workflows/publish.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,26 @@ 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:
4958
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
59+
OWNER: ${{ github.event.repository.owner.login }}
5060

5161
- name: Publish package with long name for better SEO
5262
continue-on-error: true
5363
run: |
5464
cd dist
55-
sed -i -e "s/.*name.*/\t\"name\": \"nextjs-themes-ultralight\",/" package.json
65+
sed -i -e "s/.*name.*/\t\"name\": \"nextjs-themes-ultralite\",/" package.json
5666
npm publish --provenance --access public
5767
env:
5868
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",
12+
"columnId": "column-done"
13+
},
14+
"J1yONFe2BVs5GbQJj1SXG": {
15+
"id": "J1yONFe2BVs5GbQJj1SXG",
16+
"description": "Add ThemeContainer server component",
3217
"columnId": "column-todo"
3318
},
34-
"a7ksr41sN7kQNaH8Io-dV": {
35-
"id": "a7ksr41sN7kQNaH8Io-dV",
36-
"description": "Add support for css modules",
37-
"columnId": "column-done"
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+
"J1yONFe2BVs5GbQJj1SXG",
31+
"G-1H47JpSI69kav1qZ-kp"
4632
]
4733
},
4834
{
4935
"id": "column-doing",
5036
"title": "Doing",
51-
"tasksIds": [
52-
"-FlzW8htLo-6jz5-ZqjEx"
53-
]
37+
"tasksIds": []
5438
},
5539
{
5640
"id": "column-done",
5741
"title": "Done",
5842
"tasksIds": [
59-
"a7ksr41sN7kQNaH8Io-dV",
60-
"RtA7NBfPOlfnVHqk54rMD",
61-
"fqhes_YS14GQopOUs7K-7",
62-
"task-ZJpp-dpxx3KxRMsAPNuMC",
63-
"4CTOhRPjKrEAW5AHYsV7P"
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

lib/nthul/lite.js

Lines changed: 2 additions & 1 deletion
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");
@@ -18,5 +19,5 @@ const owner = process.env.OWNER;
1819
readMe = readMe.replace(new RegExp(`$${owner}/${ref}`, "g"), tmp);
1920
readMe = readMe.replace(new RegExp(ref, "g"), packageJson.name);
2021
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(/## Want Lite Version(?:.|\n|\r)*You need r18gs as a peer-dependency/m, "");
2223
fs.writeFileSync(readMePath, readMe);

lib/nthul/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
"types": "./index.ts",
99
"repository": {
1010
"type": "git",
11-
"url": "git+https://github.com/react18-tools/nextjs-themes-ultralight.git"
11+
"url": "git+https://github.com/react18-tools/nextjs-themes-ultra.git"
1212
},
1313
"bugs": {
14-
"url": "https://github.com/react18-tools/nextjs-themes-ultralight/issues"
14+
"url": "https://github.com/react18-tools/nextjs-themes-ultra/issues"
1515
},
16-
"homepage": "https://github.com/react18-tools/nextjs-themes-ultralight/tree/main/lib/fork-me#readme",
16+
"homepage": "https://github.com/react18-tools/nextjs-themes-ultra/tree/main/lib/fork-me#readme",
1717
"sideEffects": false,
1818
"license": "MIT",
1919
"scripts": {
@@ -63,7 +63,7 @@
6363
"nextjs13",
6464
"nextjs14",
6565
"nextjs-themes",
66-
"nextjs-themes-ultralight",
66+
"nextjs-themes-ultra",
6767
"nextjs13-themes",
6868
"nextjs14-themes",
6969
"tailwind",

0 commit comments

Comments
 (0)