Install & setup - Traceton/next-generator GitHub Wiki
Navigate to your desired directory, install Next.js:
npx create-next-app your-app-name-here
Next, install next-generator as a development dependency:
npm i next-generator -D
Create and configure a nextGenConfig.json:
nextGen
You'll be prompted to enter a next-generator command, enter
init
This will generate a nextGenConfig with some default settings.
nextGenConfig.json settings
database
databasecan currently be set asmongodborpostgresql. If using mongodb you'll need to install mongoose from npm by runningnpm i mongoose. If using postgresql, you'll need to install Prisma and the prisma client by runningnpm i -D prismaandnpm i @prisma/client.
pageType
pageTypecan currently be set asnoneortailwindcss. If using Tailwind Css, make sure to follow the install instructions for Next.js HERE.
projectRootPath
projectRootPathcan be configured for any route you want to prepend your generated code, but most people should just leave this blank.
Last step
That's it! Now go check out how to use next-generator!