Skip to content

Commit 7f1c984

Browse files
committed
fix lite and scope
1 parent ba543b0 commit 7f1c984

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Nextjs-Themes-Ultralight
22

3-
[![test](https://github.com/react18-tools/nextjs-themes-ultralight/actions/workflows/test.yml/badge.svg)](https://github.com/react18-tools/nthul/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-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/)
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

lib/nthul/lite.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ const owner = process.env.OWNER;
1818
readMe = readMe.replace(new RegExp(`$${owner}/${ref}`, "g"), tmp);
1919
readMe = readMe.replace(new RegExp(ref, "g"), packageJson.name);
2020
readMe = readMe.replace(new RegExp(tmp, "g"), `$${owner}/${ref}`);
21-
readMe = readMe.replace(/## Want Lite Version.*> You need r18gs as a peer-dependency/m, "");
21+
readMe = readMe.replace(/## Want Lite Version(.|\n|\r)*You need r18gs as a peer-dependency/m, "");
2222
fs.writeFileSync(readMePath, readMe);

lib/nthul/scope.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ const fs = require("node:fs");
55
const path = require("node:path");
66

77
const owner = "mayank1513";
8-
const packageJson = require(path.resolve(process.cwd(), "package.json"));
8+
const pkgPath = path.resolve(__dirname, "dist", "package.json");
9+
const packageJson = require(pkgPath);
910
const ref = packageJson.name;
1011
if (!ref.startsWith(`@${owner}`)) {
1112
packageJson.name = `@${owner}/${packageJson.name}`;
12-
fs.writeFileSync(path.resolve(process.cwd(), "package.json"), JSON.stringify(packageJson, null, 2));
13-
const readMePath = path.resolve(process.cwd(), "README.md");
13+
fs.writeFileSync(pkgPath, JSON.stringify(packageJson, null, 2));
14+
const readMePath = path.resolve(__dirname, "dist", "README.md");
1415
let readMe = fs.readFileSync(readMePath, { encoding: "utf8" });
1516
const tmp = "!--|--!";
1617
readMe = readMe.replace(new RegExp(`$${owner}/${ref}`, "g"), tmp);

0 commit comments

Comments
 (0)