malinajs 0.7.0-alpha → 0.7.2-a3

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.
package/CHANGELOG.md CHANGED
@@ -1,4 +1,21 @@
1
1
 
2
+ ## 0.7.x
3
+ * refactoring, optimization, fixes
4
+ * export function
5
+ * manual event delegation @click|root
6
+ * able to delay destroying block (for animations)
7
+ * be able to off autosubscribe for import: !no-autosubscribe
8
+ * destructuring array/object for each
9
+ * functions mount, mountStatic
10
+ * each, index variable is not included by default
11
+ * reference to element is removed on destroying
12
+ * config.useGroupReferencing
13
+ * action can return destroy function (not only object)
14
+ * each-else
15
+ * else-if
16
+ * refactoring $onMount
17
+ * optional deep checking for passed props: prop={value} prop|deep={value}
18
+
2
19
  ## 0.6.x
3
20
 
4
21
  * style's attribute "global"
package/malina-esbuild.js CHANGED
@@ -11,11 +11,9 @@ process.argv.includes('-w') ? process.env.WATCH = 1 : null;
11
11
 
12
12
  const esbuildConfigPath = path.join(process.cwd(),'esbuild.config.js');
13
13
  const derverConfigPath = path.join(process.cwd(),'derver.config.js');
14
- const malinaConfigPath = path.join(process.cwd(),'malina.config.js');
15
14
 
16
15
  const esbuildConfig = fs.existsSync(esbuildConfigPath) ? require(esbuildConfigPath) : {};
17
16
  const derverConfig = fs.existsSync(derverConfigPath) ? require(derverConfigPath) : {};
18
- const malinaConfig = fs.existsSync(malinaConfigPath) ? require(malinaConfigPath) : {};
19
17
 
20
18
  // Executable
21
19
 
@@ -60,11 +58,6 @@ function malinaPlugin(options={}){
60
58
 
61
59
  const cssModules = new Map();
62
60
 
63
- options = {
64
- ...malinaConfig,
65
- ...options
66
- }
67
-
68
61
  if(options.displayVersion !== false) console.log('! Malina.js', malina.version);
69
62
 
70
63
  return {
@@ -77,13 +70,14 @@ function malinaPlugin(options={}){
77
70
  let source = await fsp.readFile(args.path, 'utf8');
78
71
 
79
72
  let ctx = await malina.compile(source,{
73
+ path: args.path,
80
74
  name: args.path.match(/([^/\\]+)\.\w+$/)[1],
81
75
  ...options
82
76
  });
83
77
 
84
78
  let code = ctx.result;
85
79
 
86
- if(!options.css && ctx.css.result){
80
+ if(ctx.css.result){
87
81
  const cssPath = args.path.replace(/\.\w+$/, ".malina.css").replace(/\\/g, "/");
88
82
  cssModules.set(cssPath,ctx.css.result);
89
83
  code += `\nimport "${cssPath}";`