Enhance the docs of utility.resolveFilePath()

This commit is contained in:
Mohammad Fares
2018-10-14 21:39:11 +03:00
parent 89cdebcf65
commit 992a2e179d

View File

@@ -154,9 +154,16 @@ function loadJSON(filePath) {
}
/**
* Resolve a path and add an extension to the file name
* Resolve to an absolute path
*
* Accepts
* - FileName
* - FileName.ext
* - /path/to/FileName
* - /path/to/FileName.ext
*
* - Add the extension if not already added
* - Resolve to `/path/to/FileName.ext`
*
* @param {String} filePath an absolute or a relative path
* @param {String} extension