Skip to content

Commit

Permalink
add version number to footer - fix #143
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanjudis committed Mar 19, 2015
1 parent cd17bc4 commit bae365c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion tasks/lib/phantomas.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ var Phantomas = function( grunt, options, done ) {
this.options = this.normalizeOptions( options );
this.timestamp = +new Date();
this.buildUi = options.buildUi;
this.version = require( '../../package.json' ).version;
};


Expand Down Expand Up @@ -273,7 +274,8 @@ Phantomas.prototype.createIndexHtml = function( results ) {
meta : phantomas.metadata.metrics,
results : templateResults,
timestamp : this.timestamp,
url : this.options.url
url : this.options.url,
version : this.version
} }
)
);
Expand Down
3 changes: 2 additions & 1 deletion tasks/tpl/index.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@
<button id="p--modal__close">Close</button>
</main>
<footer class="p--footer">
Made with &#x2764; and <a href="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/macbre/phantomas" target="_blank">Phantomas</a>
<p>v<%= version %></p>
<p>Made with &#x2764; and <a href="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/macbre/phantomas" target="_blank">Phantomas</a></p>
</footer>
<script>var results = [
<%= results.map( function ( result ) {
Expand Down

0 comments on commit bae365c

Please sign in to comment.