fn: dep
[contents]

Contents

Syntax

The syntax for dep calls is:

f++:  
dep(params)

n++:  
@dep(params)

Description

The dep function is for specifying dependencies, it takes a non-zero number of parameters that should be paths to existing directories and files, which adds them all as dependencies for the file being built.

Note: You can also add file dependencies manually by adding a .deps file residing in the same directory as the content file. For example if you have content/index.content as the content file add a content/index.deps file containing the extra dependencies you want to track.

Note: Nift will skip to the first non-whitespace (ie. to the first character that is not a space, tab or newline) after a dep call and inject it to the output file where the call started. If you want to prevent Nift from doing this put a '!' after the call, eg.:

@dep(path)!

f++ example

Example of dep being used with f++:

dep("site/index.html")

n++ example

Example of dep being used with n++:

@dep("site/index.html")

Sponsors