@jeefo/component
Advanced tools
Comparing version 0.0.4 to 0.0.5
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. | ||
* File Name : compiler.js | ||
* Created at : 2019-06-23 | ||
* Updated at : 2019-10-09 | ||
* Updated at : 2019-11-19 | ||
* Author : jeefo | ||
@@ -182,5 +182,4 @@ * Purpose : | ||
await component.init(); | ||
component.is_initialized = true; | ||
await initialize(component.children, $wrapper); | ||
} | ||
await initialize(component.children, $wrapper); | ||
} | ||
@@ -190,7 +189,14 @@ } | ||
async function compile (nodes, parent_component) { | ||
const template = await resolve_template(nodes, parent_component); | ||
const $wrapper = jqlite("<div></div>"); | ||
const $element = jqlite(template); | ||
const template = await resolve_template(nodes, parent_component); | ||
const $wrapper = jqlite("<div></div>"); | ||
const $elements = jqlite(template); | ||
$wrapper.append($element); | ||
if ($elements.DOM_element) { | ||
$wrapper.append($elements); | ||
} else { | ||
for (let i = 0; i < $elements.length; i+= 1) { | ||
$wrapper.append($elements[i]); | ||
} | ||
} | ||
set_elements(parent_component.children, $wrapper); | ||
@@ -197,0 +203,0 @@ await initialize(parent_component.children, $wrapper); |
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. | ||
* File Name : component_definition.js | ||
* Created at : 2019-06-24 | ||
* Updated at : 2019-09-17 | ||
* Updated at : 2019-11-16 | ||
* Author : jeefo | ||
@@ -39,6 +39,17 @@ * Purpose : | ||
const { | ||
style, template, controller, controller_name, | ||
type, style, template, controller, controller_name, | ||
bindings, dependencies = {} | ||
} = await jeefo.require(this.path); | ||
// Type | ||
if (type) { | ||
if (type.toLowerCase() === "structure") { | ||
this.is_structure = true; | ||
this.is_self_required = true; | ||
} else { | ||
throw new SyntaxError("Invalid definition type"); | ||
} | ||
} | ||
// Style | ||
if (style) { | ||
@@ -45,0 +56,0 @@ const selectors = this.selectors.map(s => `"${s}"`); |
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. | ||
* File Name : directive_definition.js | ||
* Created at : 2017-08-07 | ||
* Updated at : 2019-10-16 | ||
* Updated at : 2019-11-16 | ||
* Author : jeefo | ||
@@ -31,4 +31,3 @@ * Purpose : | ||
super(selectors, path); | ||
this.priority = 0; | ||
this.is_structure = false; | ||
this.priority = 0; | ||
} | ||
@@ -35,0 +34,0 @@ |
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. | ||
* File Name : i_definition.js | ||
* Created at : 2019-07-05 | ||
* Updated at : 2019-10-02 | ||
* Updated at : 2019-11-16 | ||
* Author : jeefo | ||
@@ -30,2 +30,3 @@ * Purpose : | ||
this.controller_name = null; | ||
this.is_structure = false; | ||
this.is_self_required = false; | ||
@@ -32,0 +33,0 @@ } |
{ | ||
"name": "@jeefo/component", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"homepage": "https://github.com/je3f0o/jeefo_component", | ||
@@ -5,0 +5,0 @@ "copyright": "2019", |
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. | ||
* File Name : structure_component.js | ||
* Created at : 2019-06-26 | ||
* Updated at : 2019-10-11 | ||
* Updated at : 2019-11-19 | ||
* Author : jeefo | ||
@@ -125,2 +125,4 @@ * Purpose : | ||
} | ||
this.is_initialized = true; | ||
} | ||
@@ -127,0 +129,0 @@ |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
7
78128
33
2283