From e8ca38ebd02cbe2ed9695fd64d8c7be46ef037eb Mon Sep 17 00:00:00 2001 From: Frank Date: Sun, 4 Dec 2022 19:09:14 +0000 Subject: [PATCH 1/3] fix: improve parse and save attribute --- src/index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/index.js b/src/index.js index 5e3db27..a9087fe 100644 --- a/src/index.js +++ b/src/index.js @@ -26,12 +26,12 @@ let linkCSS = []; let themeCSS = { dark: [], light: [] }; let styleElSheet; -let linkTag = document.querySelector('link[collection][document_id][name]:not([save="false"])'); +let linkTag = document.querySelector('link[parse], link[collection][document_id][name]'); +// let linkTag = document.querySelector('link[collection][document_id][name]:not([save="false"])'); function init() { - let parse; if (linkTag) { - parse = linkTag.getAttribute('parse'); + let parse = linkTag.getAttribute('parse'); let styleEl = document.createElement("style"); styleEl.setAttribute('component', 'CoCreateCss'); @@ -40,7 +40,7 @@ function init() { parseLinkCSS(); - if (parse != false) { + if (parse != 'false') { let elements = document.querySelectorAll("[class]"); initElements(elements); } @@ -264,7 +264,7 @@ function addNewRules() { } function save() { - if (linkTag && linkTag.hasAttribute('document_id')) { + if (linkTag && linkTag.hasAttribute('document_id') && linkTag.getAttribute(save) != 'false') { const onlyUnique = (value, index, self) => { return self.indexOf(value) === index; }; From a70f719e506637e3f9377a7706460b148289e666 Mon Sep 17 00:00:00 2001 From: Frank Date: Sun, 4 Dec 2022 19:55:33 +0000 Subject: [PATCH 2/3] fix: bump dependencies --- package.json | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 159907f..8ccd47f 100644 --- a/package.json +++ b/package.json @@ -20,9 +20,7 @@ "html5-framework", "javascript-framework" ], - "publishConfig": { - "access": "public" - }, + "publishConfig": { "access": "public" }, "scripts": { "start": "npx webpack --config webpack.config.js", "build": "NODE_ENV=production npx webpack --config webpack.config.js", @@ -61,9 +59,9 @@ "webpack-log": "^3.0.1" }, "dependencies": { - "@cocreate/crud-client": "^1.15.10", - "@cocreate/docs": "^1.4.11", - "@cocreate/hosting": "^1.6.9", - "@cocreate/observer": "^1.5.32" + "@cocreate/crud-client": "^1.15.12", + "@cocreate/docs": "^1.4.13", + "@cocreate/hosting": "^1.6.11", + "@cocreate/observer": "^1.5.33" } } From cd33dbb4d3b79df61085778848af791bf372f38d Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Sun, 4 Dec 2022 20:03:06 +0000 Subject: [PATCH 3/3] chore(release): 1.1.10 [skip ci] ## [1.1.10](https://github.com/CoCreate-app/CoCreate-css-parser/compare/v1.1.9...v1.1.10) (2022-12-04) ### Bug Fixes * bump dependencies ([a70f719](https://github.com/CoCreate-app/CoCreate-css-parser/commit/a70f719e506637e3f9377a7706460b148289e666)) * improve parse and save attribute ([e8ca38e](https://github.com/CoCreate-app/CoCreate-css-parser/commit/e8ca38ebd02cbe2ed9695fd64d8c7be46ef037eb)) --- CHANGELOG.md | 8 ++++++++ package.json | 6 ++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f627b6..dcce9c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## [1.1.10](https://github.com/CoCreate-app/CoCreate-css-parser/compare/v1.1.9...v1.1.10) (2022-12-04) + + +### Bug Fixes + +* bump dependencies ([a70f719](https://github.com/CoCreate-app/CoCreate-css-parser/commit/a70f719e506637e3f9377a7706460b148289e666)) +* improve parse and save attribute ([e8ca38e](https://github.com/CoCreate-app/CoCreate-css-parser/commit/e8ca38ebd02cbe2ed9695fd64d8c7be46ef037eb)) + ## [1.1.9](https://github.com/CoCreate-app/CoCreate-css-parser/compare/v1.1.8...v1.1.9) (2022-12-02) diff --git a/package.json b/package.json index 8ccd47f..f0a5956 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cocreate/css-parser", - "version": "1.1.9", + "version": "1.1.10", "description": "A simple css-parser component in vanilla javascript. Easily configured using HTML5 data-attributes and/or JavaScript API.", "keywords": [ "css-parser", @@ -20,7 +20,9 @@ "html5-framework", "javascript-framework" ], - "publishConfig": { "access": "public" }, + "publishConfig": { + "access": "public" + }, "scripts": { "start": "npx webpack --config webpack.config.js", "build": "NODE_ENV=production npx webpack --config webpack.config.js",