bajo-template 1.0.4 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,4 @@
1
1
  {
2
- "loopDetected%s%s": "Loop detected: %s (%s)"
2
+ "loopDetected%s%s": "Loop detected: %s (%s)",
3
+ "resourceNotFound%s": "Resource file '%s' not found"
3
4
  }
package/bajo/intl/id.json CHANGED
@@ -1,3 +1,4 @@
1
1
  {
2
- "loopDetected%s%s": "Loop detected: %s (%s)"
2
+ "loopDetected%s%s": "Loop detected: %s (%s)",
3
+ "resourceNotFound%s": "Berkas sumber daya '%s' tidak ditemukan"
3
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bajo-template",
3
- "version": "1.0.4",
3
+ "version": "1.1.0",
4
4
  "description": "Template Renderer for Bajo Framework",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -43,6 +43,7 @@ async function _render (tpl, locals = {}, opts = {}) {
43
43
  } else if (subNs === 'partial') {
44
44
  resp = this.resolvePartial(tpl, opts)
45
45
  }
46
+ if (!resp) throw this.error('resourceNotFound%s', tpl)
46
47
  const { file } = resp
47
48
  _detectLoop.call(this, tpl, file, opts)
48
49
  const fileContent = trim(fs.readFileSync(file, 'utf8'))
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes