# Add Builder

We are using nunjucks builder it is very easy to use.

It has the following Staps:

1. We have to add    `"gulp-nunjucks-render" : "^2.0.0"` in package.json as dependencies.
2. **gulpfile.js:**

   We have to declare below global variables:

   `var nunjucksRender = require('gulp-nunjucks-render');`  \
   `var units1 = process.argv[2];`  \
   `var units2 = process.argv[3];`  \
   `var units3 = process.argv[4];`

   `var inputTemplates = resourcesAssets + 'pages/*.html' ;`

   `var siteOutput = './' ;`

   We have to declare function:

   `gulp.task('nunjucks', function() {`  \
   `var layout;`  \
   `var bc;`  \
   `if (units1&&units2&&units3&&units1=="nunjucks")`  \
   `{`  \
   `layout=units2.substring(2);`  \
   `bc=units3.substring(2);`  \
   `}`  \
   `return gulp.src(inputTemplates)`  \
   `.pipe(nunjucksRender({`  \
   `path:['src/templates/'],`  \
   `data:{layout:layout, bc:bc}`  \
   `}))`  \
   `.pipe(gulp.dest(siteOutput))`  \
   `});`

   And call the function :

   `elixir(function(mix)`  \
   `{`  \
   `//nunjucks`  \
   `mix.task('nunjucks');`  \
   `});`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://lorvent.gitbook.io/rare/builder/gulp-file.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
