Skip to content

Commit

Permalink
clean package name
Browse files Browse the repository at this point in the history
  • Loading branch information
npv2k1 committed Jan 23, 2025
1 parent 941807c commit fa1acee
Show file tree
Hide file tree
Showing 24 changed files with 6,679 additions and 3,782 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
node-version: "18"
cache: "pnpm"
registry-url: "https://npm.pkg.github.com"
scope: "@pnstack"
scope: "@template-turbo-ui"

- name: Install dependencies
run: pnpm install --frozen-lockfile
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
node-version: "18"
cache: "pnpm"
registry-url: "https://npm.pkg.github.com"
scope: "@pnstack"
scope: "@template-turbo-ui"

- name: Install dependencies
run: pnpm install --frozen-lockfile
Expand All @@ -75,4 +75,4 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_CONFIG_REGISTRY: "https://npm.pkg.github.com/pnstack"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58 changes: 0 additions & 58 deletions .github/workflows/nightly-ui.yml

This file was deleted.

52 changes: 0 additions & 52 deletions .github/workflows/release-ui.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ This Turborepo includes the following packages/apps:
- `docs`: a [Next.js](https://nextjs.org/) app with [Tailwind CSS](https://tailwindcss.com/)
- `web`: another [Next.js](https://nextjs.org/) app with [Tailwind CSS](https://tailwindcss.com/)
- `ui`: a stub React component library with [Tailwind CSS](https://tailwindcss.com/) shared by both `web` and `docs` applications
- `@repo/eslint-config`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`)
- `@repo/typescript-config`: `tsconfig.json`s used throughout the monorepo
- `@template-turbo-ui/eslint-config`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`)
- `@template-turbo-ui/typescript-config`: `tsconfig.json`s used throughout the monorepo

Each package/app is 100% [TypeScript](https://www.typescriptlang.org/).

Expand Down
2 changes: 1 addition & 1 deletion apps/web/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
extends: ["@repo/eslint-config/next.js"],
extends: ["@template-turbo-ui/eslint-config/next.js"],
};
2 changes: 1 addition & 1 deletion apps/web/next.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @type {import('next').NextConfig} */
module.exports = {
reactStrictMode: true,
transpilePackages: ["@pnstack/ui"],
transpilePackages: ["@template-turbo-ui/ui"],
};
8 changes: 4 additions & 4 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
"type-check": "tsc --noEmit"
},
"dependencies": {
"@pnstack/ui": "workspace:*",
"@template-turbo-ui/ui": "workspace:*",
"next": "^15.1.6",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@next/eslint-plugin-next": "^15.1.6",
"@repo/eslint-config": "workspace:*",
"@repo/tailwind-config": "workspace:*",
"@repo/typescript-config": "workspace:*",
"@template-turbo-ui/eslint-config": "workspace:*",
"@template-turbo-ui/tailwind-config": "workspace:*",
"@template-turbo-ui/typescript-config": "workspace:*",
"@types/node": "^22.10.7",
"@types/react": "^19.0.7",
"@types/react-dom": "^19.0.3",
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import "./globals.css";
import "@pnstack/ui/styles.css";
import "@template-turbo-ui/ui/styles.css";
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import { type JSX } from "react";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";
import Image from "next/image";
import { Button } from "@pnstack/ui";
import { Button } from "@template-turbo-ui/ui";
import { type JSX } from "react";

function Gradient({
Expand Down
2 changes: 1 addition & 1 deletion apps/web/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// tailwind config is required for editor support

import type { Config } from "tailwindcss";
import sharedConfig from "@repo/tailwind-config";
import sharedConfig from "@template-turbo-ui/tailwind-config";

const config: Pick<Config, "content" | "presets"> = {
content: ["./src/app/**/*.tsx"],
Expand Down
2 changes: 1 addition & 1 deletion apps/web/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "@repo/typescript-config/nextjs.json",
"extends": "@template-turbo-ui/typescript-config/nextjs.json",
"compilerOptions": {
"plugins": [{ "name": "next" }]
},
Expand Down
2 changes: 1 addition & 1 deletion packages/config-eslint/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@repo/eslint-config",
"name": "@template-turbo-ui/eslint-config",
"version": "1.0.0",
"private": true,
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/config-prettier/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@repo/prettier-config",
"name": "@template-turbo-ui/prettier-config",
"version": "1.0.0",
"private": true,
"main": "index.json",
"files": [
"index.json"
]
}
}
4 changes: 2 additions & 2 deletions packages/config-tailwind/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@repo/tailwind-config",
"name": "@template-turbo-ui/tailwind-config",
"version": "1.0.0",
"private": true,
"exports": {
".": "./tailwind.config.ts"
},
"devDependencies": {
"@repo/typescript-config": "workspace:*",
"@template-turbo-ui/typescript-config": "workspace:*",
"tailwindcss": "^3.4.17"
}
}
2 changes: 1 addition & 1 deletion packages/config-tailwind/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "@repo/typescript-config/base.json",
"extends": "@template-turbo-ui/typescript-config/base.json",
"include": ["."],
"exclude": ["dist", "build", "node_modules"]
}
2 changes: 1 addition & 1 deletion packages/config-typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@repo/typescript-config",
"name": "@template-turbo-ui/typescript-config",
"version": "1.0.0",
"private": true,
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
root: true,
extends: ["@repo/eslint-config/react"],
extends: ["@template-turbo-ui/eslint-config/react"],
parserOptions: {
project: "./tsconfig.json",
},
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json.schemastore.org/prettierrc",
"extends": ["@repo/prettier-config"],
"extends": ["@template-turbo-ui/prettier-config"],
"overrides": [
{
"files": ["*.jsx", "*.tsx"],
Expand Down
10 changes: 5 additions & 5 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@pnstack/ui",
"name": "@template-turbo-ui/ui",
"version": "1.0.0",
"description": "Boilerplate for writing React Libraries bundled with Rollup.js to commonJs and ES6 Modules and Storybook",
"license": "MIT",
Expand Down Expand Up @@ -47,10 +47,10 @@
"react-dom": "19.x"
},
"devDependencies": {
"@repo/eslint-config": "workspace:*",
"@repo/prettier-config": "workspace:*",
"@repo/tailwind-config": "workspace:*",
"@repo/typescript-config": "workspace:*",
"@template-turbo-ui/eslint-config": "workspace:*",
"@template-turbo-ui/prettier-config": "workspace:*",
"@template-turbo-ui/tailwind-config": "workspace:*",
"@template-turbo-ui/typescript-config": "workspace:*",
"@rollup/plugin-commonjs": "^28.0.2",
"@rollup/plugin-node-resolve": "^16.0.0",
"@rollup/plugin-terser": "^0.4.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @type {import('tailwindcss').Config} */
import sharedConfig from "@repo/tailwind-config";
import sharedConfig from "@template-turbo-ui/tailwind-config";

export default {
content: ["./src/**/*.{js,jsx,ts,tsx}"],
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "@repo/typescript-config/react-library.json",
"extends": "@template-turbo-ui/typescript-config/react-library.json",
"compilerOptions": {
"baseUrl": "./src",
"paths": {
Expand Down
22 changes: 13 additions & 9 deletions packages/utils/README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
# @pnstack/utils
# @template-turbo-ui/utils

A collection of utility functions for PNStack applications.

## Installation

```bash
pnpm add @pnstack/utils
pnpm add @template-turbo-ui/utils
```

## Usage

```typescript
import { get, isEmpty, delay, randomString } from '@pnstack/utils';
import { get, isEmpty, delay, randomString } from "@template-turbo-ui/utils";

// Access nested object properties safely
const obj = { user: { profile: { name: 'John' } } };
const name = get(obj, 'user.profile.name'); // 'John'
const age = get(obj, 'user.profile.age', 0); // 0 (default value)
const obj = { user: { profile: { name: "John" } } };
const name = get(obj, "user.profile.name"); // 'John'
const age = get(obj, "user.profile.age", 0); // 0 (default value)

// Check if value is empty
isEmpty(''); // true
isEmpty(""); // true
isEmpty([]); // true
isEmpty({}); // true
isEmpty(null); // true
isEmpty(undefined); // true
isEmpty('hello'); // false
isEmpty("hello"); // false

// Delay execution
await delay(1000); // waits for 1 second
Expand All @@ -36,17 +36,21 @@ const id = randomString(10); // e.g. "a1b2c3d4e5"
## API Reference

### get(obj: any, path: string, defaultValue?: T): T | undefined

Safely access nested object properties using dot notation or array syntax.

### isEmpty(value: any): boolean

Check if a value is empty (null, undefined, empty string, empty array, empty object).

### delay(ms: number): Promise<void>

Creates a promise that resolves after the specified number of milliseconds.

### randomString(length: number): string

Generates a random string of the specified length using alphanumeric characters.

## License

MIT
MIT
Loading

0 comments on commit fa1acee

Please sign in to comment.