@daz4126/helium 0.28.0 → 0.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/helium.js +5 -3
  2. package/package.json +1 -1
package/helium.js CHANGED
@@ -43,8 +43,9 @@ window.helium = async function() {
43
43
  const element = target instanceof Node ? target : (HELIUM.refs.get(target.trim()) || $(target.trim()));
44
44
  if(element){
45
45
  const content = template ? template(data) : data;
46
- actions[i] ? element[actions[i]=="replace"?"replaceWith":actions[i]](html(content)) : element.innerHTML = content;
47
- newTargets.push(actions[i] ? content : element)
46
+ const htmlContent = html(content)
47
+ actions[i] ? element[actions[i]=="replace"?"replaceWith":actions[i]](htmlContent) : element.innerHTML = content;
48
+ newTargets.push(actions[i] ? htmlContent : element)
48
49
  } else state[target] = data
49
50
  })
50
51
  return newTargets
@@ -200,8 +201,9 @@ async function processElements(element) {
200
201
  const importAttr = el.getAttribute("@import") || el.getAttribute("data-he-import");
201
202
  if (importAttr) {
202
203
  importAttr.split(",").map((m) => m.trim()).forEach((moduleName) => {
204
+ const path = "helium_modules/" + moduleName;
203
205
  importPromises.push(
204
- import("helium_" + "modules/" + moduleName)
206
+ import(path)
205
207
  .then((module) => {
206
208
  Object.keys(module).forEach(
207
209
  (key) => (state[key] = module[key]),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daz4126/helium",
3
- "version": "0.28.0",
3
+ "version": "0.30.0",
4
4
  "main": "helium.js",
5
5
  "type": "module",
6
6
  "scripts": {