Skip to content

Commit

Permalink
Added documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
smebberson committed Oct 17, 2023
1 parent 8b2876c commit 730d1e6
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ typings/

# Next.js build output
.next
.vercel

# Nuxt.js build / generate output
.nuxt
Expand Down
51 changes: 51 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,54 @@
# next-tailwind-fontawesome

An example setup using Next.js, Tailwind CSS and Font Awesome.

# Development

To get started with development, follow these steps.

Install dependencies:

```bash
yarn
```

Start the development server:

```bash
yarn dev
```

Open a browser to http://localhost:3000. As you make changes to the code, the browser will automatically update.

# Cloudflare

This project is configured to deploy to Cloudflare Pages Site.

## Testing

To test the production build locally, follow these steps.

Build the website:

```bash
yarn build:ci
```

Run wrangler to browser the website:

```bash
yarn dev:ci
```

Open a browser to http://127.0.0.1:8788.

# Template

To use this repository as a template, after creating a new repository, complete the following steps.

Configure the repository secrets, by going to Settings > Secrets and variables > Actions and adding the `FONTAWESOME_NPM_AUTH_TOKEN` secret.

Follow the steps at [Cloudflare Docs > Pages > Deploy a Next.js site > Use the Edge Runtime](https://developers.cloudflare.com/pages/framework-guides/deploy-a-nextjs-site/#use-the-edge-runtime), with the following considerations:

- The Edge Runtime has already been setup on `app/api/features` and `app/ssr`.
- Yarn has been pinned to v1.22.19 using `packageManager` in `package.json`.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
},
"scripts": {
"build": "next build",
"build:ci": "yarn next-on-pages",
"dev": "next dev",
"dev:ci": "npx wrangler pages dev .vercel/output/static --compatibility-flag=nodejs_compat",
"lint": "next lint",
"pre-commit": "next lint",
"prepare": "husky install",
Expand Down

0 comments on commit 730d1e6

Please sign in to comment.