Skip to content

Commit

Permalink
fix lite and scope
Browse files Browse the repository at this point in the history
  • Loading branch information
mayank1513 committed Feb 23, 2024
1 parent ba543b0 commit 7f1c984
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Nextjs-Themes-Ultralight

[![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/)
[![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/)

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

Expand Down
2 changes: 1 addition & 1 deletion lib/nthul/lite.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ const owner = process.env.OWNER;
readMe = readMe.replace(new RegExp(`$${owner}/${ref}`, "g"), tmp);
readMe = readMe.replace(new RegExp(ref, "g"), packageJson.name);
readMe = readMe.replace(new RegExp(tmp, "g"), `$${owner}/${ref}`);
readMe = readMe.replace(/## Want Lite Version.*> You need r18gs as a peer-dependency/m, "");
readMe = readMe.replace(/## Want Lite Version(.|\n|\r)*You need r18gs as a peer-dependency/m, "");
fs.writeFileSync(readMePath, readMe);
7 changes: 4 additions & 3 deletions lib/nthul/scope.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ const fs = require("node:fs");
const path = require("node:path");

const owner = "mayank1513";
const packageJson = require(path.resolve(process.cwd(), "package.json"));
const pkgPath = path.resolve(__dirname, "dist", "package.json");
const packageJson = require(pkgPath);
const ref = packageJson.name;
if (!ref.startsWith(`@${owner}`)) {
packageJson.name = `@${owner}/${packageJson.name}`;
fs.writeFileSync(path.resolve(process.cwd(), "package.json"), JSON.stringify(packageJson, null, 2));
const readMePath = path.resolve(process.cwd(), "README.md");
fs.writeFileSync(pkgPath, JSON.stringify(packageJson, null, 2));
const readMePath = path.resolve(__dirname, "dist", "README.md");
let readMe = fs.readFileSync(readMePath, { encoding: "utf8" });
const tmp = "!--|--!";
readMe = readMe.replace(new RegExp(`$${owner}/${ref}`, "g"), tmp);
Expand Down

0 comments on commit 7f1c984

Please sign in to comment.