frontfire 0.8.1 → 0.8.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/package.json +1 -1
- package/src/DefaultConfig.js +27 -73
- package/src/index.js +1 -2
package/package.json
CHANGED
package/src/DefaultConfig.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/*
|
|
1
2
|
// Core
|
|
2
3
|
import fs from "node:fs";
|
|
3
4
|
import path from "node:path";
|
|
@@ -57,80 +58,33 @@ const outDirRelease = `${buildDir}/release/app`;
|
|
|
57
58
|
|
|
58
59
|
const staticAssetsDestDebug = `${buildDir}/debug/assets`;
|
|
59
60
|
const staticAssetsDestRelease = `${buildDir}/release/assets`;
|
|
60
|
-
|
|
61
|
+
*/
|
|
61
62
|
export default {
|
|
62
|
-
"buildDir"
|
|
63
|
-
"debug"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
"
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
loader: {
|
|
76
|
-
".html" : "text",
|
|
77
|
-
".png" : "file"
|
|
78
|
-
},
|
|
79
|
-
banner : {
|
|
80
|
-
js: "(() => { (new EventSource(\"/esbuild\")).addEventListener('change', () => location.reload() ); })();"
|
|
81
|
-
},
|
|
82
|
-
plugins: [
|
|
83
|
-
copy({
|
|
84
|
-
resolveFrom : 'cwd',
|
|
85
|
-
assets: [
|
|
86
|
-
{
|
|
87
|
-
from: rootFilesToCopy,
|
|
88
|
-
to: [`${buildDir}/debug` ]
|
|
89
|
-
}
|
|
90
|
-
]
|
|
91
|
-
}),
|
|
92
|
-
copyStaticFiles({
|
|
93
|
-
src: `src/assets`,
|
|
94
|
-
dest: staticAssetsDestDebug,
|
|
95
|
-
dereference: true,
|
|
96
|
-
errorOnExist: false,
|
|
97
|
-
preserveTimestamps: true,
|
|
98
|
-
recursive: true
|
|
99
|
-
})
|
|
100
|
-
]
|
|
101
|
-
},
|
|
102
|
-
},
|
|
103
|
-
"release" : {
|
|
104
|
-
"esbuild" : {
|
|
105
|
-
bundle: true,
|
|
106
|
-
sourcemap: true,
|
|
107
|
-
minify: true,
|
|
108
|
-
logLevel: "error",
|
|
109
|
-
entryPoints : entryPoints,
|
|
110
|
-
outdir : outDirRelease,
|
|
111
|
-
loader: {
|
|
112
|
-
".html" : "text",
|
|
113
|
-
".png" : "file"
|
|
114
|
-
},
|
|
115
|
-
plugins: [
|
|
116
|
-
copy({
|
|
117
|
-
resolveFrom : 'cwd',
|
|
118
|
-
assets: [
|
|
119
|
-
{
|
|
120
|
-
from: rootFilesToCopy,
|
|
121
|
-
to: [`${buildDir}/release` ]
|
|
122
|
-
}
|
|
123
|
-
]
|
|
124
|
-
}),
|
|
125
|
-
copyStaticFiles({
|
|
126
|
-
src: `src/assets`,
|
|
127
|
-
dest: staticAssetsDestRelease,
|
|
128
|
-
dereference: true,
|
|
129
|
-
errorOnExist: false,
|
|
130
|
-
preserveTimestamps: true,
|
|
131
|
-
recursive: true
|
|
132
|
-
})
|
|
133
|
-
]
|
|
63
|
+
"buildDir": "build",
|
|
64
|
+
"debug": {
|
|
65
|
+
"server": { "indexType": "html", "port": 3000 },
|
|
66
|
+
"esbuild": {
|
|
67
|
+
"bundle": true,
|
|
68
|
+
"sourcemap": true,
|
|
69
|
+
"minify": false,
|
|
70
|
+
"logLevel": "info",
|
|
71
|
+
"entryPoints": [".\\src\\app\\main.js", ".\\src\\app\\main.css"],
|
|
72
|
+
"outdir": "build/debug/app/",
|
|
73
|
+
"loader": { ".html": "text", ".png": "file" },
|
|
74
|
+
"banner": {
|
|
75
|
+
"js": "(() => { (new EventSource(\"/esbuild\")).addEventListener('change', () => location.reload() ); })();"
|
|
134
76
|
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"release": {
|
|
80
|
+
"esbuild": {
|
|
81
|
+
"bundle": true,
|
|
82
|
+
"sourcemap": true,
|
|
83
|
+
"minify": true,
|
|
84
|
+
"logLevel": "error",
|
|
85
|
+
"entryPoints": [".\\src\\app\\main.js", ".\\src\\app\\main.css"],
|
|
86
|
+
"outdir": "build/release/app",
|
|
87
|
+
"loader": { ".html": "text", ".png": "file" }
|
|
88
|
+
}
|
|
135
89
|
}
|
|
136
90
|
};
|
package/src/index.js
CHANGED
|
@@ -18,7 +18,6 @@ import { stdin as input, stdout as output } from "node:process";
|
|
|
18
18
|
import slugify from "slugify";
|
|
19
19
|
|
|
20
20
|
import frontFire from "./FrontFire.js";
|
|
21
|
-
import defaultConfig from "./DefaultConfig.js";
|
|
22
21
|
|
|
23
22
|
import wcIndex from "./templates/wc-index.js";
|
|
24
23
|
import wcTemplate from "./templates/wc-template.html.js";
|
|
@@ -346,7 +345,7 @@ if ( fs.statSync( 'frontfire.json', { "throwIfNoEntry": false } ) )
|
|
|
346
345
|
}
|
|
347
346
|
|
|
348
347
|
program
|
|
349
|
-
.command( '
|
|
348
|
+
.command( 'start-dev' )
|
|
350
349
|
.description( 'Running development server.' )
|
|
351
350
|
.action( function() { frontFire( true, customConfig ); } );
|
|
352
351
|
|