leanweb 1.0.8 → 1.0.9
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/build.js +1 -1
- package/commands/electron.js +1 -1
- package/commands/serve.js +1 -1
- package/commands/utils.js +7 -0
- package/package.json +3 -3
package/commands/build.js
CHANGED
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
});
|
|
87
87
|
|
|
88
88
|
const copySrc = () => {
|
|
89
|
-
fse.copySync(`${projectPath}/${utils.dirs.src}/`, buildDir, {
|
|
89
|
+
fse.copySync(`${projectPath}/${utils.dirs.src}/`, buildDir, { filter: utils.copySymbolLinkFilter });
|
|
90
90
|
};
|
|
91
91
|
|
|
92
92
|
const copyEnv = () => {
|
package/commands/electron.js
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
fse.copySync(`./${utils.dirs.build}/index.html`, `./${utils.dirs.electron}/index.html`);
|
|
30
30
|
fse.copySync(`./${utils.dirs.build}/${project.name}.css`, `./${utils.dirs.electron}/${project.name}.css`);
|
|
31
31
|
fse.copySync(`./${utils.dirs.build}/favicon.svg`, `./${utils.dirs.electron}/favicon.svg`);
|
|
32
|
-
project.resources
|
|
32
|
+
project.resources?.forEach(resource => {
|
|
33
33
|
fse.copySync(`./${utils.dirs.build}/${resource}`, `./${utils.dirs.electron}/${resource}`, { dereference: true });
|
|
34
34
|
});
|
|
35
35
|
|
package/commands/serve.js
CHANGED
|
@@ -26,7 +26,7 @@ const noopen = process.env.noopen || false;
|
|
|
26
26
|
fse.copySync(`./${utils.dirs.build}/${project.name}.css`, `./${utils.dirs.serve}/${project.name}.css`);
|
|
27
27
|
fse.copySync(`./${utils.dirs.build}/favicon.svg`, `./${utils.dirs.serve}/favicon.svg`);
|
|
28
28
|
project.resources?.forEach(resource => {
|
|
29
|
-
fse.copySync(`./${utils.dirs.build}/${resource}`, `./${utils.dirs.serve}/${resource}`, {
|
|
29
|
+
fse.copySync(`./${utils.dirs.build}/${resource}`, `./${utils.dirs.serve}/${resource}`, { filter: utils.copySymbolLinkFilter });
|
|
30
30
|
});
|
|
31
31
|
} catch (e) {
|
|
32
32
|
console.error(e);
|
package/commands/utils.js
CHANGED
|
@@ -3,6 +3,8 @@ const sass = require('sass');
|
|
|
3
3
|
const path = require('path');
|
|
4
4
|
const net = require('net');
|
|
5
5
|
|
|
6
|
+
const fse = require('fs-extra');
|
|
7
|
+
|
|
6
8
|
const dirs = {
|
|
7
9
|
src: 'src',
|
|
8
10
|
build: 'build',
|
|
@@ -11,6 +13,11 @@ const dirs = {
|
|
|
11
13
|
electron: 'electron',
|
|
12
14
|
};
|
|
13
15
|
|
|
16
|
+
module.exports.copySymbolLinkFilter = (src, dest) => {
|
|
17
|
+
const destStats = fse.existsSync(dest) && fse.lstatSync(dest);
|
|
18
|
+
return !destStats?.isSymbolicLink?.();
|
|
19
|
+
};
|
|
20
|
+
|
|
14
21
|
module.exports.exec = command => execSync(command, { encoding: 'utf8', stdio: 'inherit' });
|
|
15
22
|
|
|
16
23
|
module.exports.buildCSS = (scssString, currentPaths) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "leanweb",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"description": "Builds framework agnostic web components.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"leanweb": "leanweb.js",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
"node-watch": "^0.7.2",
|
|
35
35
|
"parse5": "^6.0.1",
|
|
36
36
|
"raw-loader": "^4.0.2",
|
|
37
|
-
"sass": "^1.
|
|
37
|
+
"sass": "^1.46.0",
|
|
38
38
|
"sass-loader": "^12.4.0",
|
|
39
39
|
"semver": "^7.3.5",
|
|
40
40
|
"webpack": "^5.65.0",
|
|
41
41
|
"webpack-dev-server": "^4.7.2"
|
|
42
42
|
}
|
|
43
|
-
}
|
|
43
|
+
}
|