mirror of
https://github.com/karl0ss/homepage.git
synced 2025-04-29 12:03:41 +01:00
52 lines
1.6 KiB
Markdown
52 lines
1.6 KiB
Markdown
---
|
|
title: Development
|
|
description: Homepage Development
|
|
---
|
|
|
|
## Development Overview
|
|
|
|
First, clone the homepage repository.
|
|
|
|
For installing NPM packages, this project uses [pnpm](https://pnpm.io/) (and so should you!):
|
|
|
|
```bash
|
|
pnpm install
|
|
```
|
|
|
|
Start the development server:
|
|
|
|
```bash
|
|
pnpm dev
|
|
```
|
|
|
|
Open [http://localhost:3000](http://localhost:3000) to start.
|
|
|
|
This is a [Next.js](https://nextjs.org/) application, see their documentation for more information.
|
|
|
|
## Code Linting
|
|
|
|
Once dependencies have been installed you can lint your code with
|
|
|
|
```bash
|
|
pnpm lint
|
|
```
|
|
|
|
## Code formatting with pre-commit hooks
|
|
|
|
To ensure a consistent style and formatting across the project source, the project utilizes Git [`pre-commit`](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks) hooks to perform some formatting and linting before a commit is allowed.
|
|
That way, everyone uses the same style and some common issues can be caught early on.
|
|
|
|
Once installed, hooks will run when you commit. If the formatting isn't quite right or a linter catches something, the commit will be rejected.
|
|
You'll need to look at the output and fix the issue. Some hooks will format failing files, so all you need to do is `git add` those files again
|
|
and retry your commit.
|
|
|
|
## Service Widget Guidelines
|
|
|
|
To ensure cohesiveness of various widgets, the following should be used as a guide for developing new widgets:
|
|
|
|
- Please only submit widgets that have been requested and have at least 5 'up-votes'
|
|
- Widgets should be only one row of blocks
|
|
- Widgets should be no more than 4 blocks wide
|
|
- Minimize the number of API calls
|
|
- Avoid the use of custom proxy unless absolutely necessary
|