Table of Contents
Installation
Using the NextJS starter templates
If you're starting from scratch, the easiest way to get up and running with Val and NextJS is to use npm (or similar) create script:
Integrating into an existing project
You can use the @valbuild/init script to setup your existing project with Val. Follow the following steps to this:
Make sure you have NextJS (version 14 or higher) installed
Install the required packages
Add eslint plugins
Run init script
Connect to Val Build (optional)
Required packages
Install the Val packages. You can use npm or pnpm (or yarn).
Add eslint plugin
It is optional to use the Val eslint plugin but we highly recommend it.
You will get fast feedback if you .val files are misconfigured.
Run the init script
Connect to Val Build
If you want editors to be able to create commits and live edit your application, you can go to Val Build and create a project or run the command below.
Monorepo
If you have a monorepo, or have a project where the project is located in a subdirectory relative to the github repository use the "root" property on the initVal in your val.config.ts file.
Formatting
You typically want to enable automatic formatting when Val creates commits. Follow the guide here to do that.