Comparing version 0.0.6 to 0.0.7
@@ -9,9 +9,18 @@ 'use strict'; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } | ||
var _simpleTranslationProvider = require('./simpleTranslationProvider'); | ||
var _simpleTranslationProvider2 = _interopRequireDefault(_simpleTranslationProvider); | ||
var Template = (function () { | ||
function Template(dom) { | ||
var translationProvider = arguments.length <= 1 || arguments[1] === undefined ? _simpleTranslationProvider2['default'] : arguments[1]; | ||
_classCallCheck(this, Template); | ||
this._dom = dom; | ||
this._translationProvider = translationProvider; | ||
this._init(); | ||
@@ -39,2 +48,5 @@ this._compile(); | ||
}); | ||
this._processAttributes('data-translate').forEach(function (item) { | ||
item.value.textContent = _this._translationProvider.translate(item.name, item.value); | ||
}); | ||
this._childNodes = [].slice.call(this._dom.childNodes, 0); | ||
@@ -41,0 +53,0 @@ } |
{ | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"name": "tplify", | ||
@@ -4,0 +4,0 @@ "description": "A simple html template compiler plugin for Browserify", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17769
11
303