Skip to content

Commit

Permalink
Dist: insert version information into TheKarte.
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisguse committed Apr 1, 2019
1 parent 35678ad commit ebcf0af
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ module.exports = function(grunt) {
jsdoc: {
exec: 'jsdoc --private -d doc src/*.js'
},
insertVersion: {
exec: 'sed -i -e "s>package.json:description><%= pkg.description %>>" -e "s>package.json:version><%= pkg.version %>>" -e "s>package.json:homepage><%= pkg.homepage.replace(">"> "\>") %>>g" -e "s>package.json:license><%= pkg.license %>>g" TheKarte.html'
},
help: {
exec: 'grunt --help'
}
Expand All @@ -76,5 +79,5 @@ module.exports = function(grunt) {
grunt.registerTask('format', ['jsbeautifier']);
grunt.registerTask('help', ['run:help']);
grunt.registerTask('lint', ['jshint']);
grunt.registerTask('dist', ['assets_inline']);
grunt.registerTask('dist', ['run:insertVersion', 'assets_inline']);
};
5 changes: 5 additions & 0 deletions TheKarte.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@
<script>
//Print version and other information
console.log("TheKarte\n===\n");
console.log("package.json:description");
console.log("Version: package.json:version");
console.log("Homepage: package.json:homepage");
console.log("License: package.json:license");
console.log("===\n\n");

//Configure theKarte incl. keyboard-based menu.
var theKarte = undefined;
Expand Down

0 comments on commit ebcf0af

Please sign in to comment.