Skip to content

Commit 2d04e58

Browse files
committed
Add compiler "not-name" and "not-directory" docs
1 parent e50c760 commit 2d04e58

File tree

1 file changed

+32
-5
lines changed

1 file changed

+32
-5
lines changed

Writerside/topics/06.distribute/compiler-configuration.md

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,17 @@ to include in the assembly.
264264
"build": {
265265
"finder": [
266266
{
267+
// "string" or ["string"]
268+
"directory": "vendor",
269+
270+
// "string" or ["string"]
271+
"not-directory": "vendor/phpunit",
272+
273+
// "string" or ["string"]
267274
"name": "*.php",
268-
"directory": "vendor"
275+
276+
// "string" or ["string"]
277+
"not-name": "Test.php"
269278
},
270279
// ...
271280
],
@@ -275,12 +284,16 @@ to include in the assembly.
275284
}
276285
```
277286

278-
The `"finder"` may contain an array of objects with, `"name"`
279-
and `"directory"` fields.
287+
The `"finder"` may contain an array of objects with, `"name"`, `"not-name"`,
288+
`"directory"` and `"not-directory"` fields.
280289

281290
<procedure title="name field format">
282291
Filters files by name. All files matching the
283292
specified rule will be included in the build.
293+
<tip>
294+
The <code>name</code> field may be defined as <code>string</code> or
295+
<code>array</code> of strings
296+
</tip>
284297
<step>
285298
You may specify a mask where an asterisk means any
286299
occurrence of any number of characters
@@ -293,13 +306,22 @@ an expression must start and end with the <code>/</code> characters.
293306
<code-block>/\.php$/</code-block>
294307
<code-block>/^index.*/</code-block>
295308
</step>
296-
<note>
309+
<warning>
297310
The field only checks the file <b>name</b>, not the file path.
298-
</note>
311+
</warning>
299312
</procedure>
300313

314+
<note>
315+
To exclude from the selection by names, use the <code>"not-name"</code> field
316+
with the same capabilities as <code>"name"</code> field.
317+
</note>
318+
301319
<procedure title="directory field format">
302320
Specifies the directory in which to search for files to include.
321+
<tip>
322+
The <code>directory</code> field may be defined as <code>string</code> or
323+
<code>array</code> of strings
324+
</tip>
303325
<step>
304326
You may define real path to directory.
305327
<code-block>
@@ -316,6 +338,11 @@ least one directory path).
316338
</step>
317339
</procedure>
318340

341+
<note>
342+
To exclude directories, use the <code>"not-directory"</code> field
343+
with the same capabilities as <code>"directory"</code> field.
344+
</note>
345+
319346
## `ini` {id="ini-config"}
320347

321348
Additional options for the PHP interpreter.

0 commit comments

Comments
 (0)