From 79f454fa835cba1b4ead57bb80e3ddb634ffa019 Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Thu, 17 Oct 2024 08:12:02 +0200 Subject: [PATCH 1/3] install simplyedit --- npm_post_install.sh | 29 +++++++++++++++++++++++++++-- package.json | 3 ++- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/npm_post_install.sh b/npm_post_install.sh index b779249..b6f1d4c 100755 --- a/npm_post_install.sh +++ b/npm_post_install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env sh -npm_post_install() { +installCodeMirror() { sSourceDir="${npm_config_local_prefix}/node_modules" sTargetDir="${npm_config_local_prefix}/www/js" @@ -21,4 +21,29 @@ npm_post_install() { cp -f "${sSourceDir}/codemirror/theme/base16-dark.css" "${sTargetDir}/codemirror/theme/base16-dark.css" } -npm_post_install +installSimplyEdit() { + local sSourceDir sTargetDir + + readonly sSourceDir="${npm_config_local_prefix}/node_modules/simplyedit" + readonly sTargetDir="${npm_config_local_prefix}/www" + + mkdir -p \ + "${sTargetDir}/js/" \ + "${sTargetDir}/hope/" \ + "${sTargetDir}/simply/" \ + + cp -a "${sSourceDir}/js/*" "${sTargetDir}/js" + cp -a "${sSourceDir}/js/*" "${sTargetDir}/hope" + cp -a "${sSourceDir}/js/*" "${sTargetDir}/simply" +} + +if [[ ${BASH_SOURCE[0]} != "${0}" ]]; then + export -f installSimplyEdit + export -f installCodeMirror +else + installSimplyEdit + installCodeMirror + exit $? +fi + + diff --git a/package.json b/package.json index cdc3522..d347deb 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,8 @@ "author": "SimplyEdit", "description": "Code editor in the SimplyEdit family", "dependencies": { - "codemirror": "5.65.2" + "codemirror": "5.65.2", + "simplyedit": "github:simplyedit/simplyedit" }, "keywords": [ "code", From fe62aa84d06682ceb13308d9f7f0492cd3b775cb Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Fri, 8 Nov 2024 15:31:10 +0100 Subject: [PATCH 2/3] update package lock and fix install --- npm_post_install.sh | 8 ++++---- package-lock.json | 6 +++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/npm_post_install.sh b/npm_post_install.sh index b6f1d4c..07c01f7 100755 --- a/npm_post_install.sh +++ b/npm_post_install.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env sh +#!/usr/bin/env bash installCodeMirror() { sSourceDir="${npm_config_local_prefix}/node_modules" @@ -32,9 +32,9 @@ installSimplyEdit() { "${sTargetDir}/hope/" \ "${sTargetDir}/simply/" \ - cp -a "${sSourceDir}/js/*" "${sTargetDir}/js" - cp -a "${sSourceDir}/js/*" "${sTargetDir}/hope" - cp -a "${sSourceDir}/js/*" "${sTargetDir}/simply" + cp -a "${sSourceDir}/js/"* "${sTargetDir}/js" + cp -a "${sSourceDir}/hope/"* "${sTargetDir}/hope" + cp -a "${sSourceDir}/simply/"* "${sTargetDir}/simply" } if [[ ${BASH_SOURCE[0]} != "${0}" ]]; then diff --git a/package-lock.json b/package-lock.json index 6339bf9..1220aea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,8 @@ "hasInstallScript": true, "license": "MIT", "dependencies": { - "codemirror": "5.65.2" + "codemirror": "5.65.2", + "simplyedit": "github:simplyedit/simplyedit" } }, "node_modules/codemirror": { @@ -16,6 +17,9 @@ "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.65.2.tgz", "integrity": "sha512-SZM4Zq7XEC8Fhroqe3LxbEEX1zUPWH1wMr5zxiBuiUF64iYOUH/JI88v4tBag8MiBS8B8gRv8O1pPXGYXQ4ErA==", "license": "MIT" + }, + "node_modules/simplyedit": { + "resolved": "git+ssh://git@github.com/simplyedit/simplyedit.git#004c14675574c1edb5a1fc3ccae32097f9154069" } } } From 99013470fdf0a58243c4030c080141cf8c8254aa Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Fri, 8 Nov 2024 15:31:24 +0100 Subject: [PATCH 3/3] update simply-edit --- www/simply/toolbar.simply-basepack.html | 1 + www/simply/toolbar.simply-image.html | 1 + 2 files changed, 2 insertions(+) diff --git a/www/simply/toolbar.simply-basepack.html b/www/simply/toolbar.simply-basepack.html index 06ab6e9..49bc688 100644 --- a/www/simply/toolbar.simply-basepack.html +++ b/www/simply/toolbar.simply-basepack.html @@ -1516,6 +1516,7 @@

HTML Image Toolbar

editor.responsiveImages.initImage(hopeEditor.field); editor.plugins.image.reselect(); editor.context.update(); + editor.fireEvent("databinding:valuechanged", hopeEditor.field); } }, "simply-insert-image" : function() { diff --git a/www/simply/toolbar.simply-image.html b/www/simply/toolbar.simply-image.html index 9e40ba3..ced290e 100644 --- a/www/simply/toolbar.simply-image.html +++ b/www/simply/toolbar.simply-image.html @@ -482,6 +482,7 @@

HTML Image Toolbar

editor.responsiveImages.initImage(hopeEditor.field); editor.plugins.image.reselect(); editor.context.update(); + editor.fireEvent("databinding:valuechanged", hopeEditor.field); } }, "simply-insert-image" : function() {