From 748c5d7643cfdc9b114823a4e23077d35e0af7fd Mon Sep 17 00:00:00 2001 From: Gleb Ryshkov Date: Tue, 14 Jun 2016 15:58:58 +0100 Subject: [PATCH] Documented exclusion of folder or node module from marko.json autodiscovery; --- docs/custom-taglibs.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/custom-taglibs.md b/docs/custom-taglibs.md index 4e693dd380..39897f12c2 100644 --- a/docs/custom-taglibs.md +++ b/docs/custom-taglibs.md @@ -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.