Skip to content

Commit

Permalink
feat: Upgrade dependencies & rebuild
Browse files Browse the repository at this point in the history
Rebuild bundle after upgrading dependencies.
  • Loading branch information
macie committed Nov 19, 2022
1 parent fadd588 commit ebfccad
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 19 deletions.
10 changes: 3 additions & 7 deletions dist/smallstache.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@
factory(mod.exports);
global.Smallstache = mod.exports;
}
})(this, function (_exports) {
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports) {
"use strict";

Object.defineProperty(_exports, "__esModule", {
value: true
});
_exports.default = Smallstache;

_exports["default"] = Smallstache;
/*
Smallstache - a JavaScript template engine.
Expand All @@ -34,9 +33,9 @@
if (typeof source !== 'string') {
throw new TypeError('Template source must be a string');
}

this.source = source;
}

/*
Fill template with data object.
Expand All @@ -46,13 +45,10 @@
Returns:
A string with tags replaced by corresponding data.
*/


Smallstache.prototype.fill = function (data) {
function fillTemplate(tag, name) {
return data[name] != null ? data[name] : tag;
}

return this.source.replace(/{{\s*([^}\s]+)\s*}}/g, fillTemplate);
};
});
Expand Down
2 changes: 1 addition & 1 deletion dist/smallstache.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "smallstache",
"version": "0.5.1",
"version": "0.5.2",
"description": "Lightweight template engine similar to Mustache/Handlebars.",
"keywords": [
"smallstache",
Expand All @@ -17,18 +17,18 @@
"lint": "eslint src tests"
},
"devDependencies": {
"@babel/cli": "7.1.x",
"@babel/core": "7.1.x",
"@babel/plugin-transform-modules-umd": "7.1.x",
"@babel/preset-env": "7.1.x",
"@babel/cli": "7.19.x",
"@babel/core": "7.20.x",
"@babel/plugin-transform-modules-umd": "7.18.x",
"@babel/preset-env": "7.20.x",
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "23.6.x",
"eslint": "5.6.x",
"jest": "23.6.x",
"mkdirp": "0.5.x",
"babel-jest": "29.3.x",
"eslint": "8.28.x",
"jest": "29.3.x",
"mkdirp": "1.0.x",
"npm-check-updates": "^16.4.1",
"regenerator-runtime": "0.12.x",
"uglify-js": "3.4.x"
"regenerator-runtime": "0.13.x",
"uglify-js": "3.17.x"
},
"files": [
"dist",
Expand Down

0 comments on commit ebfccad

Please # to comment.