Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F3010143
cli.ts
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1005 B
Referenced Files
None
Subscribers
None
cli.ts
View Options
#!/usr/bin/env node
import
{
addCollection
}
from
"./add-collection"
;
import
{
addRoute
}
from
"./add-route"
;
import
{
buildProject
}
from
"./build"
;
import
{
generateScssIncludes
}
from
"./find-scss-includes"
;
import
{
generateCollections
}
from
"./generate-collections"
;
import
{
generateRoutes
}
from
"./generate-routes"
;
const
actions
:
Record
<
string
,
(...
args
:
string
[])
=>
Promise
<
void
>
|
undefined
>
=
{
"add-collection"
:
addCollection
,
"add-route"
:
addRoute
,
"generate-collections"
:
generateCollections
,
"generate-routes"
:
generateRoutes
,
"generate-scss-includes"
:
generateScssIncludes
,
build
:
buildProject
,
default
:
async
function
()
{
console
.
log
(
"Usage: `sealscript <action>`"
);
console
.
log
(
`Available actions:
${
Object
.
keys
(
actions
)
.
filter
((
e
)
=>
e
!=
"default"
)
.
join
(
", "
)
}
`
);
},
};
void
(
async
function
()
{
const
action
=
process
.
argv
.
at
(
2
);
actions
;
const
fn
=
actions
[
action
||
"default"
]
||
actions
.
default
;
await
fn
(...
process
.
argv
.
slice
(
3
));
})();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, May 7, 19:37 (1 d, 18 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
630194
Default Alt Text
cli.ts (1005 B)
Attached To
Mode
rSGEN sealgen
Attached
Detach File
Event Timeline
Log In to Comment