Skip to content

Commit

Permalink
Documented exclusion of folder or node module from marko.json autodis…
Browse files Browse the repository at this point in the history
…covery;
  • Loading branch information
oxala committed Jun 14, 2016
1 parent f8c8b5f commit 748c5d7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/custom-taglibs.md
Original file line number Diff line number Diff line change
Expand Up @@ -351,3 +351,15 @@ The search path will be the following:
4. `/my-project/marko.json`
5. `/my-project/node_modules/foo/marko.json`
6. `/my-project/node_modules/bar/marko.json`

If you wish to hide particular folder and/or node_module from discovery of marko.json, you can exclude those from the search with:

```javascript
require('marko/compiler').taglibFinder.excludeDir(dirPath);
// Where 'dirPath' is an absolute path to the folder containing marko.json

require('marko/compiler').taglibFinder.excludePackage(packageName);
// Where 'packageName' is the name of the node_module containing marko.json
```

Those statements should be used before any marko rendering happened in the process.

0 comments on commit 748c5d7

Please sign in to comment.