From ebcf0af2f4c4c2a23eeb1ff4c9d37a1b2b7d59eb Mon Sep 17 00:00:00 2001 From: Dennis Guse Date: Mon, 1 Apr 2019 17:09:08 +0200 Subject: [PATCH] Dist: insert version information into TheKarte. --- Gruntfile.js | 5 ++++- TheKarte.html | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Gruntfile.js b/Gruntfile.js index 1898074..4a6eaa6 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -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' } @@ -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']); }; diff --git a/TheKarte.html b/TheKarte.html index 2cbf975..0a3b134 100755 --- a/TheKarte.html +++ b/TheKarte.html @@ -85,6 +85,11 @@