Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can now pass --exclude as a flag #220

Merged
merged 3 commits into from
Nov 28, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions docs/content/usage.md
Original file line number Diff line number Diff line change
@@ -43,6 +43,21 @@ Example:
gomplate --input-dir=templates --output-dir=config --datasource config=config.yaml
```

### `--exclude`

To prevent certain files from being processed, you can use `--exclude`. It takes a glob, and any files matching that glob will not be included.

Example:

```
gomplate --exclude example/** \
--exclude *.png
```

This will stop all files in the example folder from being processed, as well as all .png files in the root folder.

You can also chain the exclude flag to build up a series of globs to be excluded

## `--datasource`/`-d`

Add a data source in `name=URL` form. Specify multiple times to add multiple sources. The data can then be used by the [`datasource`](../functions/#datasource) and [`include`](../functions/#include) functions.