FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
stackflow/scripts/build-ui.js at main · obycode/stackflow · GitHub
obycode
/
stackflow
Public
Notifications
You must be signed in to change notification settings
Fork
2
Star
5
Code
Issues
2
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
stackflow
/
scripts
/
build-ui.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
25 lines (20 loc) · 658 Bytes
Breadcrumbs
stackflow
/
scripts
/
build-ui.js
Copy path
File metadata and controls
25 lines (20 loc) · 658 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import
path
from
"node:path"
;
import
{
fileURLToPath
}
from
"node:url"
;
import
{
build
}
from
"esbuild"
;
const
__filename
=
fileURLToPath
(
import
.
meta
.
url
)
;
const
__dirname
=
path
.
dirname
(
__filename
)
;
const
root
=
path
.
resolve
(
__dirname
,
".."
)
;
const
entry
=
path
.
resolve
(
root
,
"server/ui/main.src.js"
)
;
const
outfile
=
path
.
resolve
(
root
,
"server/ui/main.js"
)
;
await
build
(
{
entryPoints
:
[
entry
]
,
outfile
,
bundle
:
true
,
format
:
"esm"
,
platform
:
"browser"
,
target
:
[
"es2020"
]
,
sourcemap
:
false
,
minify
:
false
,
legalComments
:
"none"
,
}
)
;
console
.
log
(
`[build-ui] bundled
${
path
.
relative
(
root
,
entry
)
}
->
${
path
.
relative
(
root
,
outfile
)
}
`
)
;
Back
|
FazBrowse Home
|
New Git URL