GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Added documentation on how to run the Unit Tests. · 701/JavaScript-Templates@ca2597e

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • README.md
  • bower.json
  • package.json
  • test
    • index.html
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎README.md‎

Copy file name to clipboardExpand all lines: README.md
+9Lines changed: 9 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -337,5 +337,14 @@ tmpl.js templates/upload.html templates/download.html > tmpl.min.js
337337
The files given as command line arguments to **tmpl.js** can either be pure template files or HTML documents with embedded template script sections. For the pure template files, the file names (without extension) serve as template ids.
338338
The generated file can be included in your project as a replacement for the original **tmpl.js** runtime. It provides you with the same API and provides a **tmpl(id, data)** function that accepts the id of one of your templates as first and a data object as optional second parameter.
339339

340+
## Tests
341+
The JavaScript Templates project comes with [Unit Tests](http://en.wikipedia.org/wiki/Unit_testing).
342+
There are two different ways to run the tests:
343+
344+
* Open test/index.html in your browser or
345+
* run `npm test` in the Terminal in the root path of the repository package.
346+
347+
The first one tests the browser integration, the second one the [node.js](http://nodejs.org/) integration.
348+
340349
## License
341350
The JavaScript Templates script is released under the [MIT license](http://www.opensource.org/licenses/MIT).
Collapse file

‎bower.json‎

Copy file name to clipboardExpand all lines: bower.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "blueimp-tmpl",
3-
"version": "2.2.1",
3+
"version": "2.2.2",
44
"title": "JavaScript Templates",
55
"description": "< 1KB lightweight, fast & powerful JavaScript templating engine with zero dependencies. Compatible with server-side environments like node.js, module loaders like RequireJS and all web browsers.",
66
"keywords": [
Collapse file

‎package.json‎

Copy file name to clipboardExpand all lines: package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "blueimp-tmpl",
3-
"version": "2.2.1",
3+
"version": "2.2.2",
44
"title": "JavaScript Templates",
55
"description": "< 1KB lightweight, fast & powerful JavaScript templating engine with zero dependencies. Compatible with server-side environments like node.js, module loaders like RequireJS and all web browsers.",
66
"keywords": [
Collapse file

‎test/index.html‎

Copy file name to clipboardExpand all lines: test/index.html
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@
2323
</head>
2424
<body>
2525
<div id="mocha"></div>
26-
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
2726
<script src="http://blueimp.github.io/cdn/js/mocha.min.js"></script>
2827
<script src="http://blueimp.github.io/cdn/js/expect.min.js"></script>
2928
<script>
3029
mocha.setup('bdd');
31-
$(function () {
32-
mocha.run();
33-
});
3430
</script>
3531
<script type="text/x-tmpl" id="template">{%=o.value%}</script>
3632
<script src="../js/tmpl.js"></script>
3733
<script src="test.js"></script>
34+
<script>
35+
mocha.checkLeaks();
36+
mocha.run();
37+
</script>
3838
</body>
3939
</html>

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.