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

wally-registry-frontend Framework Migration #197

Merged
merged 27 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# Insta uncommitted snapshots
*.snap.new

*.DS_Store
*.DS_Store
6 changes: 0 additions & 6 deletions package-lock.json

This file was deleted.

15 changes: 0 additions & 15 deletions wally-registry-frontend/.babelrc

This file was deleted.

3 changes: 0 additions & 3 deletions wally-registry-frontend/.dockerignore

This file was deleted.

11 changes: 0 additions & 11 deletions wally-registry-frontend/.editorconfig

This file was deleted.

34 changes: 0 additions & 34 deletions wally-registry-frontend/.eslintrc

This file was deleted.

13 changes: 13 additions & 0 deletions wally-registry-frontend/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"plugins": ["jsx-a11y"],
"extends": [
"next/core-web-vitals",
"next/typescript",
"plugin:jsx-a11y/strict"
],
"rules": {
"no-constant-condition": ["error", { "checkLoops": true }],
"no-unused-vars": 0,
"no-console": 2
}
}
2 changes: 1 addition & 1 deletion wally-registry-frontend/.fantasticonrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"inputDir": "icons",
"outputDir": "src/fonts",
"outputDir": "src/app/fonts",
"fontTypes": ["woff2"],
"fontsUrl": "",
"assetTypes": ["ts", "css"],
Expand Down
2 changes: 0 additions & 2 deletions wally-registry-frontend/.gitattributes

This file was deleted.

54 changes: 35 additions & 19 deletions wally-registry-frontend/.gitignore
Original file line number Diff line number Diff line change
@@ -1,24 +1,40 @@
.env
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# Output directories
/dev
/dist
# dependencies
/node_modules
/.pnp
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# Stuff used by the generator tool
/.cache
# misc
.DS_Store
*.pem

# npm modules
/node_modules
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# env files (can opt-in for commiting if needed)
.env*

# vercel
.vercel

# fantasticon generated files
/static/fonts/icons.css
/static/fonts/icons.woff2
# /src/types/icons.d.ts
/src/overlay.png

# firebase
firebase-debug.log
firestore-debug.log
ui-debug.log
.firebase
# typescript
*.tsbuildinfo
next-env.d.ts
12 changes: 0 additions & 12 deletions wally-registry-frontend/Dockerfile

This file was deleted.

38 changes: 26 additions & 12 deletions wally-registry-frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,25 @@

The Wally registry website serves as a place for Wally users to view information about the Wally package manager.

This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).

## Usage

To run in development mode:
First, run the development server:

```bash
npm install

## Pick one:
# for front end and back end:
npm run dev
# for just front end
npm run dev:front
# or
yarn dev
# or
pnpm dev
# or
bun dev
```

To build to the `dist/` directory:
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

To build the production server:

```bash
npm run build
Expand All @@ -25,7 +29,7 @@ npm run build
All files should be formatted with Prettier before committing. You can either (pick one):

- Install the Prettier editor extension, and turn on the "format file on save" setting in your editor
- Run the `npm run format` command before committing any files, which will format all changed files in-place.
- Run the `npm run lint` command before committing any files, which will format all changed files in-place.

## Recommended Editor Extensions

Expand All @@ -42,18 +46,28 @@ These extensions make working on this project easier and help prevent mistakes.

The main source code for the website.

#### ./src/assets
#### ./public/assets

Any images that are imported by the website should go here. Make sure you crush them before committing (see below)

### ./icons

This folder contains SVG icons that are built into an icon font using fantasticon. They are usable with the `<Icon />` component.

### ./static
### Fonts

This folder will be copied into the build and anything in it will be available on the public website.
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Iosevka](https://typeof.net/Iosevka/).

## MDX

This project makes use of MDX files, which is Markdown mixed with JSX. MDX can be used for pages, and is used for both `install` and `policies`. You can learn more [here](https://mdxjs.com/).

## .env

In order to run this project, you must create a `.env` file with the following fields:

```
NEXT_PUBLIC_WALLY_API_URL=""
```

The public, base Wally API endpoint is `https://api.wally.run`.
22 changes: 0 additions & 22 deletions wally-registry-frontend/build.js

This file was deleted.

15 changes: 15 additions & 0 deletions wally-registry-frontend/next.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import createMDX from "@next/mdx"
import type { NextConfig } from "next"

const nextConfig: NextConfig = {
pageExtensions: ["js", "jsx", "md", "mdx", "ts", "tsx"],
compiler: {
styledComponents: true,
},
}

const withMDX = createMDX({
// Add markdown plugins here, as desired
})

export default withMDX(nextConfig)
Loading
Loading