Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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)
- Host: GitHub
- URL: https://github.com/lailo/next-with-tailwindcss
- Owner: lailo
- License: mit
- Created: 2019-08-04T19:30:16.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-09T21:38:00.000Z (about 2 years ago)
- Last Synced: 2023-03-06T13:53:25.225Z (almost 2 years ago)
- Topics: dark-mode, dark-mode-toggle, dark-theme, jest, jest-snapshots, jest-tests, nextjs, postcss, prettier, react, tailwindcss, typescript
- Language: TypeScript
- Homepage: https://next-with-tailwindcss.now.sh
- Size: 2.8 MB
- Stars: 17
- Watchers: 1
- Forks: 2
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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`