all repos — h3 @ 31e768dcf15238f7131e49a09e65498a2ba4bd35

A tiny, extremely minimalist JavaScript microframework.

Updated release script to include version.
h3rald h3rald@h3rald.com
Wed, 13 May 2020 17:21:40 +0200
commit

31e768dcf15238f7131e49a09e65498a2ba4bd35

parent

66286ec4291306b8fe21cbfb07c6c370ffd6c166

4 files changed, 16 insertions(+), 4 deletions(-)

jump to
M docs/example/assets/js/h3.jsdocs/example/assets/js/h3.js

@@ -1,9 +1,9 @@

/** + * H3 v0.5.0 "Experienced El-Aurian" * Copyright 2020 Fabio Cevasco <h3rald@h3rald.com> * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - * */ const checkProperties = (obj1, obj2) => { for (const key in obj1) {
M docs/js/h3.jsdocs/js/h3.js

@@ -1,9 +1,9 @@

/** + * H3 v0.5.0 "Experienced El-Aurian" * Copyright 2020 Fabio Cevasco <h3rald@h3rald.com> * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - * */ const checkProperties = (obj1, obj2) => { for (const key in obj1) {
M h3.jsh3.js

@@ -1,9 +1,9 @@

/** + * H3 v0.5.0 "Experienced El-Aurian" * Copyright 2020 Fabio Cevasco <h3rald@h3rald.com> * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - * */ const checkProperties = (obj1, obj2) => { for (const key in obj1) {
M scripts/release.jsscripts/release.js

@@ -6,9 +6,21 @@ const overview = "./docs/md/overview.md";

const app = "./docs/js/app.js"; const tutorial = "./docs/md/tutorial.md"; const package = "./package.json"; +const h3 = "./h3.js"; const pkg = JSON.parse(fs.readFileSync(package, "utf8")); +// Update h3.js + +const h3Data = fs.readFileSync(h3, "utf8"); +const notice = h3Data.match(/\/\*\*((.|\n|\r)+?)\*\//gm)[0]; +const newNotice = notice + .replace(/v\d+\.\d+\.\d+/, `v${pkg.version}`) + .replace(/\"[^"]+\"/, `"${pkg.versionName}"`) + .replace(/Copyright \d+/, `Copyright ${new Date().getFullYear()}`); +fs.writeFileSync(h3, h3Data.replace(notice, newNotice)); + + // Update README.md let readmeData = fs.readFileSync(readme, "utf8"); readmeData = readmeData.replace(/v\d+\.\d+\.\d+/, `v${pkg.version}`);

@@ -16,7 +28,7 @@ readmeData = readmeData.replace(

/Download v\d+\.\d+\.\d+ \([^)]+\)/, `Download v${pkg.version} (${pkg.versionName})` ); -readmeData = readmeData.replace(/### Can I download(\n|.)+/gm, ''); +readmeData = readmeData.replace(/### Can I download(\n|.)+/gm, ""); fs.writeFileSync(readme, readmeData); // Remove badges and copy to overview.md