Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: adds development guide #8

Merged
merged 2 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@ jobs:
- name: Install dependencies
run: npm install

- name: Build package
run: npm run build
- name: Build packages
run: npm run build:packages
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ jobs:
- name: Install dependencies
run: npm install

- name: Build package
run: npm run build
- name: Build packages
run: npm run build:packages

- name: Release @hyperjumptech/react-next-pathname
run: npm publish --provenance --access public
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,22 @@ const Sidebar = () => {

Currently, the `@hyperjumptech/react-next-pathname-nextjs` package only supports the Page Router. If you are using the App Router, you can use the `@hyperjumptech/react-next-pathname` package. However, please note that it is not fully optimized for the App Router.

## Development Guide

If this is the first time you have cloned the repository, run the following commands:

```bash
npm install
npm run build:packages
```

If you want to run the example, navigate to the example app directory and run the development server:

```bash
cd apps/example-nextjs
npm run dev
```

## License

[MIT License](/LICENSE)
2 changes: 1 addition & 1 deletion apps/example-nextjs/src/components/navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useNextPathname } from "../../../../packages/react-next-pathname-nextjs/dist/index.mjs";
import { useNextPathname } from "@hyperjumptech/react-next-pathname-nextjs";
import Link from "next/link";

const tabs = [
Expand Down
2 changes: 1 addition & 1 deletion apps/example-nextjs/src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import "~/styles/globals.css";

import type { AppProps } from "next/app";
import { NextPathnameProvider } from "../../../../packages/react-next-pathname-nextjs/dist/index.mjs";
import { NextPathnameProvider } from "@hyperjumptech/react-next-pathname-nextjs";
import Navbar from "~/components/navbar";

export default function App({ Component, pageProps }: AppProps) {
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"name": "react-next-pathname",
"private": true,
"scripts": {
"build": "turbo build",
"build:packages": "turbo run build --filter=@hyperjumptech/*",
"build:apps": "turbo run build --filter=example-*",
"lint": "turbo lint",
"test": "turbo test",
"test:coverage": "turbo test:coverage"
Expand Down