Included version number into compiled resources
authorThierry Florac <tflorac@ulthar.net>
Sat, 21 Nov 2020 13:45:36 +0100
changeset 11 b6023e43122d
parent 10 9054aa80e825
child 12 18a3bec81f25
Included version number into compiled resources
gulpfile.js
package.json
src/myams/resources/css/myams.css
src/myams/resources/js/myams-require.js
src/myams/resources/js/myams.js
src/myams/resources/less/myams.less
--- a/gulpfile.js	Sat Nov 21 10:28:53 2020 +0100
+++ b/gulpfile.js	Sat Nov 21 13:45:36 2020 +0100
@@ -2,6 +2,7 @@
 const { src, dest, task, watch, parallel } = require('gulp');
 const concat = require('gulp-concat');
 const less = require('gulp-less');
+const replace = require('gulp-replace');
 
 const
 	package = require('./package.json'),
@@ -11,6 +12,7 @@
 task('css', function() {
 	return src(paths.less_main, { cwd: paths.less_base })
 		.pipe(less())
+		.pipe(replace('$Tag$', `Version: ${package.version}`))
 		.pipe(dest(paths.less_target));
 });
 
@@ -18,6 +20,7 @@
 task('scripts', function() {
 	return src(paths.sources, { cwd: paths.base })
 		.pipe(concat(paths.target.replace(/{version}/, package.version)))
+		.pipe(replace('$Tag$', `Version: ${package.version}`))
 		.pipe(dest(paths.base));
 });
 
@@ -25,6 +28,7 @@
 task('scripts_core', function() {
 	return src(paths.core_sources, { cwd: paths.base })
 		.pipe(concat(paths.core_target.replace(/{version}/, package.version)))
+		.pipe(replace('$Tag$', `Version: ${package.version}`))
 		.pipe(dest(paths.base));
 });
 
--- a/package.json	Sat Nov 21 10:28:53 2020 +0100
+++ b/package.json	Sat Nov 21 13:45:36 2020 +0100
@@ -1,6 +1,6 @@
 {
 	"name": "myams",
-	"version": "0.1.40",
+	"version": "0.1.41",
 	"private": true,
 	"scripts": {
 		"gulp": "gulp"
@@ -46,7 +46,8 @@
 	"devDependencies": {
 		"gulp": "^4.0.2",
 		"gulp-concat": "^2.6.1",
-		"gulp-less": "^4.0.1"
+		"gulp-less": "^4.0.1",
+		"gulp-replace": "^1.0.0"
 	},
 	"description": "MyAMS client framework",
 	"author": "Thierry Florac <thierry.florac@onf.fr>",
--- a/src/myams/resources/css/myams.css	Sat Nov 21 10:28:53 2020 +0100
+++ b/src/myams/resources/css/myams.css	Sat Nov 21 13:45:36 2020 +0100
@@ -2,7 +2,7 @@
  * MyAMS
  * « My Application Management Skin »
  *
- * $Tag$ (rev. 1)
+ * Version: 0.1.41 (rev. 1)
  * A bootstrap based application/administration skin
  *
  * Custom administration and application skin tools
--- a/src/myams/resources/js/myams-require.js	Sat Nov 21 10:28:53 2020 +0100
+++ b/src/myams/resources/js/myams-require.js	Sat Nov 21 13:45:36 2020 +0100
@@ -2,7 +2,7 @@
  * MyAMS
  * « My Application Management Skin »
  *
- * $Tag$ (rev. 1)
+ * Version: 0.1.41 (rev. 1)
  * A bootstrap based application/administration skin
  *
  * Custom administration and application skin tools
--- a/src/myams/resources/js/myams.js	Sat Nov 21 10:28:53 2020 +0100
+++ b/src/myams/resources/js/myams.js	Sat Nov 21 13:45:36 2020 +0100
@@ -2,7 +2,7 @@
  * MyAMS
  * « My Application Management Skin »
  *
- * $Tag$ (rev. 1)
+ * Version: 0.1.41 (rev. 1)
  * A bootstrap based application/administration skin
  *
  * Custom administration and application skin tools
--- a/src/myams/resources/less/myams.less	Sat Nov 21 10:28:53 2020 +0100
+++ b/src/myams/resources/less/myams.less	Sat Nov 21 13:45:36 2020 +0100
@@ -2,7 +2,7 @@
  * MyAMS
  * « My Application Management Skin »
  *
- * $Tag: 0.1.38 $ (rev. 1)
+ * $Tag: default/master $ (rev. 1)
  * A bootstrap based application/administration skin
  *
  * Custom administration and application skin tools