leanweb 1.0.9 → 1.1.3

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/README.md CHANGED
@@ -259,6 +259,7 @@ items = ["one", "two", "three"];
259
259
  <br />
260
260
  <button lw-on:click="resetName()">Reset Name</button>
261
261
  ```
262
+
262
263
  You could bind multiple events like `lw-on:click,change=handler($event, $node)`.
263
264
 
264
265
  ```javascript
@@ -318,24 +319,26 @@ imageWidth = 400;
318
319
  `demo-parent.html`
319
320
 
320
321
  ```html
321
- <demo-child lw-input:userData="user"></demo-child>
322
+ <demo-child lw-input:parent="self" lw-input:userData="user"></demo-child>
322
323
  ```
323
324
 
324
325
  `demo-parent.js`
325
326
 
326
327
  ```javascript
327
328
  // ...
329
+ // self is defined in LWElement as `self = this`;
328
330
  user = { firstname: "Qian", lastname: "Chen" };
329
331
  // ...
330
332
  ```
331
333
 
332
- The child is able to access the `user` object passed in with `lw-input:`
333
- directive from `inputReady()` method.
334
+ The child is able to access the `parent` and `user` object passed in with
335
+ `lw-input:` directive from `inputReady()` method.
334
336
  `demo-child.js`
335
337
 
336
338
  ```javascript
337
339
  // ...
338
340
  inputReady() {
341
+ console.log(this.parent);
339
342
  console.log(this.userData);
340
343
  }
341
344
  // ...
@@ -476,9 +479,7 @@ Assuming npm module `lodash-es` is installed, you could use any of the
476
479
  following `import` statements for your web component class:
477
480
 
478
481
  ```javascript
479
- import { get } from "lodash-es"; // find from node_modules
480
- import get from "lodash-es/get.js"; // find from node_modules
481
- import * as _ from "lodash-es"; // find from node_modules
482
+ import get from "/node_modules/lodash-es/get.js"; // find from node_modules
482
483
  ```
483
484
 
484
485
  Importing a JSON file:
@@ -490,7 +491,7 @@ import someJSON from "./some.json";
490
491
  Importing CSS/SCSS:
491
492
 
492
493
  ```javascript
493
- import agate from "highlight.js/scss/agate.scss";
494
+ import agate from "/node_modules/highlight.js/scss/agate.scss";
494
495
 
495
496
  // customElements.define('demo-root',
496
497
  // class extends LWElement { // LWElement extends HTMLElement
package/commands/build.js CHANGED
@@ -1,56 +1,68 @@
1
- (async () => {
2
- const fs = require('fs');
3
- const path = require('path');
4
- const fse = require('fs-extra');
5
- const utils = require('./utils.js');
6
- const parser = require('../lib/lw-html-parser.js');
1
+ import fs from 'fs';
2
+ import fse from 'fs-extra';
3
+ import * as utils from './utils.js';
4
+ import * as parser from '../lib/lw-html-parser.js';
5
+
6
+ import path from 'path';
7
+ import { fileURLToPath } from 'url';
8
+ const __filename = fileURLToPath(import.meta.url);
9
+ const __dirname = path.dirname(__filename);
7
10
 
11
+ import { createRequire } from "module";
12
+ const require = createRequire(import.meta.url);
13
+
14
+ (async () => {
8
15
  let env;
9
16
  const args = process.argv;
10
17
  if (args.length >= 3) {
11
18
  env = args[2];
12
19
  }
13
20
 
14
- const replaceNodeModulesImport = (str, filePath) => {
15
- // match import not starting with dot or slash
16
- return str.replace(/^(\s*import.+?['"])([^\.|\/].+?)(['"].*)$/gm, (m, a, b, c) => {
17
- if (b.startsWith(`~`)) {
18
- // ~/package.json
19
- return a + path.normalize(`${process.cwd()}/` + b.substring(1)) + c;
20
- } else if (b.indexOf('/') > -1) {
21
- // lodash-es/get.js
22
- return a + path.normalize(`${process.cwd()}/node_modules/` + b) + c;
23
- } else {
24
- const nodeModulePath = `${process.cwd()}/node_modules/` + b + '/package.json';
25
- const package = require(nodeModulePath);
26
- // lodash-es
27
- return a + path.normalize(`${process.cwd()}/node_modules/` + b + '/' + package.main) + c;
28
- }
29
- });
30
- };
31
-
32
- const walkDirSync = (dir, accept = null, callback) => {
33
- fs.readdirSync(dir).forEach(f => {
34
- let dirPath = path.join(dir, f);
35
- const isDirectory = fs.statSync(dirPath).isDirectory() && (!accept || (typeof accept === 'function' && accept(dirPath, f)));
36
- isDirectory ? walkDirSync(dirPath, accept, callback) : callback(path.join(dirPath));
37
- });
38
- };
39
-
40
- const preprocessJsImport = filePath => {
41
- if (filePath.toLowerCase().endsWith('.js') && !filePath.toLowerCase().endsWith('/ast.js') && !filePath.startsWith(`${utils.dirs.build}/lib/`)) {
42
- let jsFileString = fs.readFileSync(filePath, 'utf8');
43
- jsFileString = replaceNodeModulesImport(jsFileString, filePath);
44
- fs.writeFileSync(filePath, jsFileString);
45
- }
46
- };
47
-
48
- const buildDirFilter = dirPath => {
49
- if (dirPath.startsWith(`${utils.dirs.build}/lib/`)) {
50
- return false;
51
- }
52
- return true;
53
- };
21
+ // const replaceNodeModulesImport = (str, filePath) => {
22
+ // // match import not starting with dot or slash
23
+ // return str.replace(/^([^\S\r\n]*(?:importScripts|import).+?['"])((?!\.|\/|http\:|https\:).*?)(['"].*)$/gm, (m, a, b, c) => {
24
+ // if (b.startsWith(`~`)) {
25
+ // // ~/package.json
26
+ // return a + path.normalize(`${process.cwd()}/` + b.substring(1)) + c;
27
+ // } else if (b.indexOf('/') > -1) {
28
+ // // lodash-es/get.js
29
+ // return a + path.normalize(`${process.cwd()}/node_modules/` + b) + c;
30
+ // } else {
31
+ // const nodeModulePath = `${process.cwd()}/node_modules/` + b + '/package.json';
32
+ // const package = require(nodeModulePath);
33
+ // // lodash-es
34
+ // return a + path.normalize(`${process.cwd()}/node_modules/` + b + '/' + package.main) + c;
35
+ // }
36
+ // });
37
+ // };
38
+
39
+ // const walkDirSync = (dir, accept = null, callback) => {
40
+ // fs.readdirSync(dir).forEach(f => {
41
+ // let dirPath = path.join(dir, f);
42
+ // const isDirectory = fs.statSync(dirPath).isDirectory() && (!accept || (typeof accept === 'function' && accept(dirPath, f)));
43
+ // isDirectory ? walkDirSync(dirPath, accept, callback) : callback(path.join(dirPath));
44
+ // });
45
+ // };
46
+
47
+ // const preprocessJsImport = filePath => {
48
+ // if (
49
+ // filePath.toLowerCase().endsWith('.js') &&
50
+ // !filePath.toLowerCase().endsWith('/ast.js') &&
51
+ // !filePath.startsWith(`${utils.dirs.build}/lib/`) &&
52
+ // !filePath.startsWith(`${utils.dirs.build}/resources/`)
53
+ // ) {
54
+ // let jsFileString = fs.readFileSync(filePath, 'utf8');
55
+ // jsFileString = replaceNodeModulesImport(jsFileString, filePath);
56
+ // fs.writeFileSync(filePath, jsFileString);
57
+ // }
58
+ // };
59
+
60
+ // const buildDirFilter = dirPath => {
61
+ // if (dirPath.startsWith(`${utils.dirs.build}/lib/`)) {
62
+ // return false;
63
+ // }
64
+ // return true;
65
+ // };
54
66
 
55
67
  const leanwebPackageJSON = require(`${__dirname}/../package.json`);
56
68
 
@@ -96,7 +108,7 @@
96
108
  };
97
109
 
98
110
  const buildJS = () => {
99
- walkDirSync(buildDir, buildDirFilter, preprocessJsImport);
111
+ // walkDirSync(buildDir, buildDirFilter, preprocessJsImport);
100
112
 
101
113
  const jsString = project.components.reduce((acc, cur) => {
102
114
  const cmpName = utils.getComponentName(cur);
package/commands/clean.js CHANGED
@@ -1,5 +1,5 @@
1
- const fs = require('fs');
2
- const utils = require('./utils.js');
1
+ import fs from 'fs';
2
+ import * as utils from './utils.js';
3
3
 
4
4
  (async () => {
5
5
  fs.rmSync(utils.dirs.build + '/', { recursive: true, force: true });
@@ -1,24 +1,29 @@
1
- const fs = require('fs');
2
- const utils = require('./utils.js');
1
+ import fs from 'fs';
2
+ import * as utils from './utils.js';
3
3
 
4
- const args = process.argv;
5
- if (args.length < 3) {
6
- console.log('Usage: lw destroy project-name');
7
- console.log(`This will delete ${utils.dirs.src}/ ${utils.dirs.build}/ ${utils.dirs.dist}/ ${utils.dirs.serve}/ and ${utils.dirs.electron}/`)
8
- return;
9
- }
4
+ import { createRequire } from "module";
5
+ const require = createRequire(import.meta.url);
10
6
 
11
- const projectName = args[2];
7
+ (async () => {
8
+ const args = process.argv;
9
+ if (args.length < 3) {
10
+ console.log('Usage: lw destroy project-name');
11
+ console.log(`This will delete ${utils.dirs.src}/ ${utils.dirs.build}/ ${utils.dirs.dist}/ ${utils.dirs.serve}/ and ${utils.dirs.electron}/`)
12
+ return;
13
+ }
12
14
 
13
- const project = require(`${process.cwd()}/${utils.dirs.src}/leanweb.json`);
15
+ const projectName = args[2];
14
16
 
15
- if (projectName !== project.name) {
16
- console.error('Error: project name doesn\'t match.');
17
- return;
18
- }
17
+ const project = require(`${process.cwd()}/${utils.dirs.src}/leanweb.json`);
19
18
 
20
- fs.rmSync(utils.dirs.build + '/', { recursive: true, force: true });
21
- fs.rmSync(utils.dirs.dist + '/', { recursive: true, force: true });
22
- fs.rmSync(utils.dirs.src + '/', { recursive: true, force: true });
23
- fs.rmSync(utils.dirs.serve + '/', { recursive: true, force: true });
24
- fs.rmSync(utils.dirs.electron + '/', { recursive: true, force: true });
19
+ if (projectName !== project.name) {
20
+ console.error('Error: project name doesn\'t match.');
21
+ return;
22
+ }
23
+
24
+ fs.rmSync(utils.dirs.build + '/', { recursive: true, force: true });
25
+ fs.rmSync(utils.dirs.dist + '/', { recursive: true, force: true });
26
+ fs.rmSync(utils.dirs.src + '/', { recursive: true, force: true });
27
+ fs.rmSync(utils.dirs.serve + '/', { recursive: true, force: true });
28
+ fs.rmSync(utils.dirs.electron + '/', { recursive: true, force: true });
29
+ })();
package/commands/dist.js CHANGED
@@ -1,9 +1,13 @@
1
- const webpack = require('webpack');
2
- const utils = require('./utils.js');
3
- const fs = require('fs');
4
- const fse = require('fs-extra');
5
- const minify = require('html-minifier').minify;
6
- const CleanCSS = require('clean-css');
1
+ import webpack from 'webpack';
2
+ import * as utils from './utils.js';
3
+ import fs from 'fs';
4
+ import fse from 'fs-extra';
5
+ // const minify = require('html-minifier').minify;
6
+ import { minify } from 'html-minifier';
7
+ import CleanCSS from 'clean-css';
8
+
9
+ import { createRequire } from "module";
10
+ const require = createRequire(import.meta.url);
7
11
 
8
12
  let env = '';
9
13
  const args = process.argv;
@@ -54,7 +58,7 @@ if (args.length >= 3) {
54
58
  fs.writeFileSync(`./${utils.dirs.dist}/${project.name}.css`, minifiedAppCss.styles);
55
59
 
56
60
  fse.copySync(`./${utils.dirs.build}/favicon.svg`, `./${utils.dirs.dist}/favicon.svg`);
57
- project.resources.forEach(resource => {
61
+ project.resources?.forEach(resource => {
58
62
  fse.copySync(`./${utils.dirs.build}/${resource}`, `./${utils.dirs.dist}/${resource}`, { dereference: true });
59
63
  });
60
64
  });
@@ -1,9 +1,18 @@
1
- (async () => {
2
- const fs = require('fs');
3
- const fse = require('fs-extra');
4
- const webpack = require('webpack');
5
- const utils = require('./utils.js');
6
1
 
2
+ import fs from 'fs';
3
+ import fse from 'fs-extra';
4
+ import webpack from 'webpack';
5
+ import * as utils from './utils.js';
6
+
7
+ import path from 'path';
8
+ import { fileURLToPath } from 'url';
9
+ const __filename = fileURLToPath(import.meta.url);
10
+ const __dirname = path.dirname(__filename);
11
+
12
+ import { createRequire } from "module";
13
+ const require = createRequire(import.meta.url);
14
+
15
+ (async () => {
7
16
  let env = '';
8
17
  const args = process.argv;
9
18
  if (args.length >= 3) {
@@ -1,7 +1,15 @@
1
- (async () => {
2
- const fs = require('fs');
3
- const utils = require('./utils.js');
1
+ import fs from 'fs';
2
+ import * as utils from './utils.js';
3
+
4
+ import path from 'path';
5
+ import { fileURLToPath } from 'url';
6
+ const __filename = fileURLToPath(import.meta.url);
7
+ const __dirname = path.dirname(__filename);
4
8
 
9
+ import { createRequire } from "module";
10
+ const require = createRequire(import.meta.url);
11
+
12
+ (async () => {
5
13
  const args = process.argv;
6
14
  if (args.length < 3) {
7
15
  console.error('Usage: lw generate component-names');
package/commands/help.js CHANGED
@@ -1,7 +1,6 @@
1
- (async () => {
2
-
3
- const utils = require('./utils.js');
1
+ import * as utils from './utils.js';
4
2
 
3
+ (async () => {
5
4
  if (process.argv.length < 3) {
6
5
  utils.exec('npx lw version');
7
6
  console.log('Usage: lw target parameters');
package/commands/init.js CHANGED
@@ -1,11 +1,19 @@
1
+ import fs from 'fs';
2
+ import fse from 'fs-extra';
3
+ import git from 'isomorphic-git';
4
+ import globby from 'globby';
5
+ import * as utils from './utils.js';
6
+
7
+ import path from 'path';
8
+ import { fileURLToPath } from 'url';
9
+ const __filename = fileURLToPath(import.meta.url);
10
+ const __dirname = path.dirname(__filename);
11
+
12
+ import { createRequire } from "module";
13
+ const require = createRequire(import.meta.url);
14
+
1
15
  (async () => {
2
- const fs = require('fs');
3
- const fse = require('fs-extra');
4
- const path = require('path');
5
- const git = require('isomorphic-git');
6
- const globby = require('globby');
7
16
  const args = process.argv;
8
- const utils = require('./utils.js');
9
17
 
10
18
  const leanwebJSONExisted = fs.existsSync(`${process.cwd()}/${utils.dirs.src}/leanweb.json`);
11
19
  const packageJSONExisted = fs.existsSync(`${process.cwd()}/package.json`);
package/commands/serve.js CHANGED
@@ -1,8 +1,11 @@
1
- const fse = require('fs-extra');
2
- const utils = require('./utils.js');
3
- const webpack = require('webpack');
4
- const watch = require('node-watch');
5
- const WebpackDevServer = require('webpack-dev-server');
1
+ import fse from 'fs-extra';
2
+ import * as utils from './utils.js';
3
+ import webpack from 'webpack';
4
+ import watch from 'node-watch';
5
+ import WebpackDevServer from 'webpack-dev-server';
6
+
7
+ import { createRequire } from "module";
8
+ const require = createRequire(import.meta.url);
6
9
 
7
10
  let env = '';
8
11
  const args = process.argv;
@@ -1,7 +1,15 @@
1
- const semver = require('semver');
2
- const fs = require('fs');
3
- const fse = require('fs-extra');
4
- const utils = require('./utils.js');
1
+ import fs from 'fs';
2
+ import fse from 'fs-extra';
3
+ import semver from 'semver';
4
+ import * as utils from './utils.js';
5
+
6
+ import path from 'path';
7
+ import { fileURLToPath } from 'url';
8
+ const __filename = fileURLToPath(import.meta.url);
9
+ const __dirname = path.dirname(__filename);
10
+
11
+ import { createRequire } from "module";
12
+ const require = createRequire(import.meta.url);
5
13
 
6
14
  const leanwebPackageJSON = require(`${__dirname}/../package.json`);
7
15
  const projectLeanwebJSON = require(`${process.cwd()}/${utils.dirs.src}/leanweb.json`);
package/commands/utils.js CHANGED
@@ -1,11 +1,19 @@
1
- const { execSync } = require('child_process');
2
- const sass = require('sass');
3
- const path = require('path');
4
- const net = require('net');
5
-
6
- const fse = require('fs-extra');
7
-
8
- const dirs = {
1
+ // const { execSync } = require('child_process');
2
+ import { execSync } from 'child_process';
3
+ // const sass = require('sass');
4
+ import sass from 'sass';
5
+ // import path from 'path';
6
+ import path from 'path';
7
+ // const net = require('net');
8
+ import net from 'net';
9
+
10
+ // import fse from 'fs-extra';
11
+ import fse from 'fs-extra';
12
+
13
+ import { createRequire } from "module";
14
+ const require = createRequire(import.meta.url);
15
+
16
+ export const dirs = {
9
17
  src: 'src',
10
18
  build: 'build',
11
19
  serve: 'serve',
@@ -13,14 +21,14 @@ const dirs = {
13
21
  electron: 'electron',
14
22
  };
15
23
 
16
- module.exports.copySymbolLinkFilter = (src, dest) => {
24
+ export const copySymbolLinkFilter = (src, dest) => {
17
25
  const destStats = fse.existsSync(dest) && fse.lstatSync(dest);
18
26
  return !destStats?.isSymbolicLink?.();
19
27
  };
20
28
 
21
- module.exports.exec = command => execSync(command, { encoding: 'utf8', stdio: 'inherit' });
29
+ export const exec = command => execSync(command, { encoding: 'utf8', stdio: 'inherit' });
22
30
 
23
- module.exports.buildCSS = (scssString, currentPaths) => {
31
+ export const buildCSS = (scssString, currentPaths) => {
24
32
  if (scssString.trim()) {
25
33
  const includePaths = [currentPaths, path.resolve(process.cwd(), dirs.build), path.resolve(process.cwd(), 'node_modules')];
26
34
  const cssResult = sass.renderSync({ data: scssString, includePaths });
@@ -29,7 +37,7 @@ module.exports.buildCSS = (scssString, currentPaths) => {
29
37
  return '';
30
38
  };
31
39
 
32
- module.exports.getComponentName = cmp => {
40
+ export const getComponentName = cmp => {
33
41
  const indexOfLastSlash = cmp.lastIndexOf('/');
34
42
  if (indexOfLastSlash > -1) {
35
43
  return cmp.substring(indexOfLastSlash + 1);
@@ -37,7 +45,7 @@ module.exports.getComponentName = cmp => {
37
45
  return cmp;
38
46
  };
39
47
 
40
- module.exports.getPathLevels = filePath => {
48
+ export const getPathLevels = filePath => {
41
49
  filePath = path.normalize(filePath);
42
50
  const numSlashes = filePath.replace(/[^\/]/g, '').length;
43
51
  let ret = '';
@@ -47,7 +55,7 @@ module.exports.getPathLevels = filePath => {
47
55
  return ret;
48
56
  };
49
57
 
50
- module.exports.throttle = (callback, limit = 100) => {
58
+ export const throttle = (callback, limit = 100) => {
51
59
  let wait = false;
52
60
  return function () {
53
61
  if (!wait) {
@@ -60,7 +68,7 @@ module.exports.throttle = (callback, limit = 100) => {
60
68
  };
61
69
  };
62
70
 
63
- module.exports.getWebPackConfig = (outputDir, project) => {
71
+ export const getWebPackConfig = (outputDir, project) => {
64
72
  return {
65
73
  entry: process.cwd() + `/${dirs.build}/${project.name}.js`,
66
74
  output: {
@@ -80,7 +88,7 @@ module.exports.getWebPackConfig = (outputDir, project) => {
80
88
  }]
81
89
  },
82
90
  }, {
83
- test: /\.(scss|sass)$/i,
91
+ test: /\.(scss|sass|css)$/i,
84
92
  use: [
85
93
  {
86
94
  loader: require.resolve('css-loader'),
@@ -113,7 +121,7 @@ module.exports.getWebPackConfig = (outputDir, project) => {
113
121
  }
114
122
  };
115
123
 
116
- module.exports.portInUse = (port, address = '127.0.0.1') => {
124
+ export const portInUse = (port, address = '127.0.0.1') => {
117
125
  return new Promise((resolve, reject) => {
118
126
  const server = net.createServer(socket => socket.pipe(socket));
119
127
 
@@ -128,8 +136,6 @@ module.exports.portInUse = (port, address = '127.0.0.1') => {
128
136
  });
129
137
  };
130
138
 
131
- module.exports.dirs = dirs;
132
-
133
139
  const initNote = `Usage: leanweb init or leanweb init project-name
134
140
  leanweb init will initialize a leanweb project with the name of the current
135
141
  working directory, otherwise, if a project-name is provided, the provided
@@ -229,7 +235,7 @@ leanweb generate login is the same as leanweb g login
229
235
  const versionNote = `Usage: leanweb version
230
236
  Print version information for leanweb.`;
231
237
 
232
- module.exports.targets = {
238
+ export const targets = {
233
239
  'init': { file: 'init.js', note: initNote },
234
240
  'generate': { file: 'generate.js', note: generateNote },
235
241
  'serve': { file: 'serve.js', note: serveNote },
@@ -1,2 +1,4 @@
1
+ import { createRequire } from "module";
2
+ const require = createRequire(import.meta.url);
1
3
  const packageJSON = require('../package.json');
2
4
  console.log(packageJSON.name, packageJSON.version);
package/leanweb.js CHANGED
@@ -1,10 +1,18 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- (async () => {
3
+ import fs from 'fs';
4
+ import semver from 'semver';
5
+ import * as utils from './commands/utils.js';
6
+
7
+ import { createRequire } from "module";
8
+ const require = createRequire(import.meta.url);
4
9
 
5
- const fs = require('fs');
6
- const semver = require('semver');
7
- const utils = require('./commands/utils.js');
10
+ import path from 'path';
11
+ import { fileURLToPath } from 'url';
12
+ const __filename = fileURLToPath(import.meta.url);
13
+ const __dirname = path.dirname(__filename);
14
+
15
+ (async () => {
8
16
 
9
17
  const args = process.argv;
10
18
 
@@ -1,5 +1,5 @@
1
- const parse5 = require('parse5');
2
- const parser = require('@babel/parser');
1
+ import * as parse5 from 'parse5';
2
+ import * as parser from '@babel/parser';
3
3
 
4
4
  let astKey = 0;
5
5
 
@@ -91,7 +91,7 @@ const walkNode = (node, interpolation) => {
91
91
  node.childNodes && node.childNodes.forEach(childNode => walkNode(childNode, interpolation));
92
92
  };
93
93
 
94
- const parse = html => {
94
+ export const parse = html => {
95
95
  const ast = {};
96
96
  const doc = parse5.parseFragment(html, { sourceCodeLocationInfo: true });
97
97
  walkNode(doc, ast);
@@ -100,8 +100,6 @@ const parse = html => {
100
100
  return ast;
101
101
  };
102
102
 
103
- module.exports = { parse };
104
-
105
103
 
106
104
  // const html = `<div>
107
105
  // <span class="x" lw>/a/;(1+(2+3))</span>
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "leanweb",
3
- "version": "1.0.9",
3
+ "version": "1.1.3",
4
4
  "description": "Builds framework agnostic web components.",
5
5
  "bin": {
6
6
  "leanweb": "leanweb.js",
7
7
  "lw": "leanweb.js"
8
8
  },
9
+ "type": "module",
9
10
  "repository": {
10
11
  "type": "git",
11
12
  "url": "git+https://github.com/elgs/leanweb.git"
@@ -19,25 +20,25 @@
19
20
  "author": "Qian Chen",
20
21
  "license": "MIT",
21
22
  "dependencies": {
22
- "@babel/core": "^7.16.7",
23
- "@babel/parser": "^7.16.7",
24
- "@babel/plugin-transform-runtime": "^7.16.7",
25
- "@babel/preset-env": "^7.16.7",
23
+ "@babel/core": "^7.16.12",
24
+ "@babel/parser": "^7.16.12",
25
+ "@babel/plugin-transform-runtime": "^7.16.10",
26
+ "@babel/preset-env": "^7.16.11",
26
27
  "babel-loader": "^8.2.3",
27
- "clean-css": "^5.2.2",
28
+ "clean-css": "^5.2.4",
28
29
  "css-loader": "^6.5.1",
29
30
  "fs-extra": "^10.0.0",
30
- "globby": "^11.0.4",
31
+ "globby": "^13.1.0",
31
32
  "html-minifier": "^4.0.0",
32
- "isomorphic-git": "^1.10.3",
33
+ "isomorphic-git": "^1.11.1",
33
34
  "json5-loader": "^4.0.1",
34
- "node-watch": "^0.7.2",
35
+ "node-watch": "^0.7.3",
35
36
  "parse5": "^6.0.1",
36
37
  "raw-loader": "^4.0.2",
37
- "sass": "^1.46.0",
38
+ "sass": "^1.49.0",
38
39
  "sass-loader": "^12.4.0",
39
40
  "semver": "^7.3.5",
40
- "webpack": "^5.65.0",
41
- "webpack-dev-server": "^4.7.2"
41
+ "webpack": "^5.67.0",
42
+ "webpack-dev-server": "^4.7.3"
42
43
  }
43
44
  }
@@ -1,4 +1,4 @@
1
- const { app, BrowserWindow } = require('electron');
1
+ import { app, BrowserWindow } from 'electron';
2
2
 
3
3
  const createWindow = () => {
4
4
  // Create the browser window.
@@ -97,6 +97,7 @@ const nextAllSiblings = (el, selector) => {
97
97
  };
98
98
 
99
99
  export default class LWElement extends HTMLElement {
100
+ me = self;
100
101
  constructor(ast) {
101
102
  super();
102
103
  this.ast = ast;