leanweb 2.0.2 → 2.0.4
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/commands/serve.js +0 -7
- package/commands/utils.js +1 -2
- package/package.json +5 -5
- package/templates/lib/lw-element.js +1 -1
package/commands/serve.js
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import { createRequire } from "module";
|
|
2
|
-
const require = createRequire(import.meta.url);
|
|
3
|
-
|
|
4
|
-
import fs from 'fs';
|
|
5
|
-
import fse from 'fs-extra';
|
|
6
1
|
import * as utils from './utils.js';
|
|
7
2
|
import watch from 'node-watch';
|
|
8
3
|
import liveServer from 'live-server';
|
|
@@ -20,8 +15,6 @@ const noopen = process.env.noopen || false;
|
|
|
20
15
|
|
|
21
16
|
(async () => {
|
|
22
17
|
|
|
23
|
-
const project = require(`${process.cwd()}/${utils.dirs.src}/leanweb.json`);
|
|
24
|
-
|
|
25
18
|
const build = async (eventType, filename) => {
|
|
26
19
|
// console.log(eventType + ': ', filename);
|
|
27
20
|
await utils.exec(`npx leanweb build ${env}`);
|
package/commands/utils.js
CHANGED
|
@@ -8,7 +8,6 @@ import fse from 'fs-extra';
|
|
|
8
8
|
export const dirs = {
|
|
9
9
|
src: 'src',
|
|
10
10
|
build: 'build',
|
|
11
|
-
serve: 'serve',
|
|
12
11
|
dist: 'dist',
|
|
13
12
|
};
|
|
14
13
|
|
|
@@ -34,7 +33,7 @@ export const writeIfChanged = (file, string) => {
|
|
|
34
33
|
}
|
|
35
34
|
}
|
|
36
35
|
fs.writeFileSync(file, string);
|
|
37
|
-
}
|
|
36
|
+
};
|
|
38
37
|
|
|
39
38
|
export const exec = command => execSync(command, { encoding: 'utf8', stdio: 'inherit' });
|
|
40
39
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "leanweb",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "Builds framework agnostic web components.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"leanweb": "leanweb.js",
|
|
@@ -20,17 +20,17 @@
|
|
|
20
20
|
"author": "Qian Chen",
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@babel/parser": "^7.20.
|
|
23
|
+
"@babel/parser": "^7.20.7",
|
|
24
24
|
"clean-css": "^5.3.1",
|
|
25
|
-
"esbuild": "^0.
|
|
25
|
+
"esbuild": "^0.16.12",
|
|
26
26
|
"fs-extra": "^11.1.0",
|
|
27
|
-
"globby": "^13.1.
|
|
27
|
+
"globby": "^13.1.3",
|
|
28
28
|
"html-minifier": "^4.0.0",
|
|
29
29
|
"isomorphic-git": "^1.21.0",
|
|
30
30
|
"live-server": "^1.2.2",
|
|
31
31
|
"node-watch": "^0.7.3",
|
|
32
32
|
"parse5": "^7.1.2",
|
|
33
|
-
"sass": "^1.
|
|
33
|
+
"sass": "^1.57.1",
|
|
34
34
|
"semver": "^7.3.8"
|
|
35
35
|
}
|
|
36
36
|
}
|
|
@@ -282,7 +282,7 @@ export default class LWElement extends HTMLElement {
|
|
|
282
282
|
propertyExpr = astModel.name;
|
|
283
283
|
}
|
|
284
284
|
|
|
285
|
-
if (modelNode.type === 'number') {
|
|
285
|
+
if (modelNode.type === 'number' || modelNode.type === 'range') {
|
|
286
286
|
// set do_not_update mark for cases when user inputs 0.01, 0.0 will not be evaluated prematurely
|
|
287
287
|
modelNode.do_not_update = true;
|
|
288
288
|
object[propertyExpr] = modelNode.value * 1;
|