@@ -122,15 +122,18 @@ pub struct NapiWatchOptions {
122
122
123
123
#[ napi( object) ]
124
124
pub struct NapiProjectOptions {
125
- /// A root path from which all files must be nested under. Trying to access
126
- /// a file outside this root will fail. Think of this as a chroot.
125
+ /// An absolute root path from which all files must be nested under. Trying to access
126
+ /// a file outside this root will fail, so think of this as a chroot.
127
+ /// E.g. `/home/user/projects/my-repo`.
127
128
pub root_path : RcStr ,
128
129
129
- /// A path inside the root_path which contains the app/pages directories.
130
+ /// A path which contains the app/pages directories, relative to [`Project::root_path`].
131
+ /// E.g. `apps/my-app`
130
132
pub project_path : RcStr ,
131
133
132
- /// next.config's distDir. Project initialization occurs earlier than
133
- /// deserializing next.config, so passing it as separate option.
134
+ /// A path where to emit the build outputs, relative to [`Project::project_path`].
135
+ /// Corresponds to next.config.js's `distDir`.
136
+ /// E.g. `.next`
134
137
pub dist_dir : RcStr ,
135
138
136
139
/// Filesystem watcher options.
@@ -176,15 +179,18 @@ pub struct NapiProjectOptions {
176
179
/// [NapiProjectOptions] with all fields optional.
177
180
#[ napi( object) ]
178
181
pub struct NapiPartialProjectOptions {
179
- /// A root path from which all files must be nested under. Trying to access
180
- /// a file outside this root will fail. Think of this as a chroot.
182
+ /// An absolute root path from which all files must be nested under. Trying to access
183
+ /// a file outside this root will fail, so think of this as a chroot.
184
+ /// E.g. `/home/user/projects/my-repo`.
181
185
pub root_path : Option < RcStr > ,
182
186
183
- /// A path inside the root_path which contains the app/pages directories.
187
+ /// A path which contains the app/pages directories, relative to [`Project::root_path`].
188
+ /// E.g. `apps/my-app`
184
189
pub project_path : Option < RcStr > ,
185
190
186
- /// next.config's distDir. Project initialization occurs earlier than
187
- /// deserializing next.config, so passing it as separate option.
191
+ /// A path where to emit the build outputs, relative to [`Project::project_path`].
192
+ /// Corresponds to next.config.js's `distDir`.
193
+ /// E.g. `.next`
188
194
pub dist_dir : Option < Option < RcStr > > ,
189
195
190
196
/// Filesystem watcher options.
0 commit comments