Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lailo/next-with-tailwindcss

NextJS with TypeScript and TailwindCSS (with dark theme switch)
https://github.com/lailo/next-with-tailwindcss

dark-mode dark-mode-toggle dark-theme jest jest-snapshots jest-tests nextjs postcss prettier react tailwindcss typescript

Last synced: about 1 month ago
JSON representation

NextJS with TypeScript and TailwindCSS (with dark theme switch)

Awesome Lists containing this project

README

        

# NextJS with Tailwind CSS and TypeScript

This is a demo project to show how to setup [NextJS](https://nextjs.org) with [TypeScript](https://www.typescriptlang.org/), [TailwindCSS](https://tailwindcss.com) and [Jest](https://jestjs.io).

It shows how you can use a utility-first CSS framework with snapshot testing to have nice tests with different component stats (loading, disabled, active, ...).

To reduce the CSS bundle size of TailwindCSS, I added [PurgeCSS](https://www.purgecss.com/).

## Development

1. `npm install`
2. `npm run dev`

## Testing

`npm test`

## Production

1. `npm run build`
2. `npm run start`