Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F1262267
find-css-includes.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
find-css-includes.ts
View Options
import
{
promises
as
fs
}
from
"fs"
;
import
_locreq
from
"locreq"
;
import
{
relative
}
from
"path"
;
import
{
walkDir
}
from
"./utils/walk"
;
const
target_locreq
=
_locreq
(
process
.
cwd
());
export
async
function
generate_css_includes
()
:
Promise
<
void
>
{
const
files
=
await
Promise
.
all
(
(
await
walkDir
(
target_locreq
.
resolve
(
"src/"
)))
.
filter
(
(
f
)
=>
f
.
endsWith
(
".css"
)
&&
!
f
.
endsWith
(
"/main.css"
)
&&
!
f
.
endsWith
(
"\\main.css"
)
&&
!
f
.
endsWith
(
"/includes.css"
)
&&
!
f
.
endsWith
(
"\\includes.css"
)
&&
!
f
.
includes
(
".#"
)
)
.
map
((
fullpath
)
=>
relative
(
target_locreq
.
resolve
(
"src/"
),
fullpath
)
)
);
await
fs
.
writeFile
(
target_locreq
.
resolve
(
"src/includes.css"
),
`/* DO NOT EDIT! This file is generated automaticaly with npx sealgen generate-css-includes */
@import "../node_modules/@sealcode/sealgen/src/forms/forms.css";
${
files
.
map
((
path
)
=>
`@import "
${
path
.
replaceAll
(
"\\"
,
"/"
)
}
";`
).
join
(
"\n"
)
}
`
);
// eslint-disable-next-line no-console
console
.
log
(
"Successfuly generated new src/includes.css file"
);
}
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Thu, Jan 23, 19:19 (20 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
601504
Default Alt Text
find-css-includes.ts (1 KB)
Attached To
Mode
rSGEN sealgen
Attached
Detach File
Event Timeline
Log In to Comment