Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F22399254
README.md
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
README.md
View Options
In
order
to
add
Font
Squirrel
fonts
with
get
-
fonts
command
you
need
to
create
fonts
.
json
file
with
the
following
structure
:
```
{
"fontSquirrel"
:
{
"source-sans-pro"
:
[],
"fira-sans"
:
[
"hair"
,
"medium"
]
}
}
```
where
you
put
an
empty
brackets
for
a
regular
style
font
or
a
list
of
desired
font
styles
.
##
Register
External
Controllers
and
Styles
When
creating
a
module
that
is
a
dependency
for
a
Sealgen
app
,
you
can
automatically
register
your
module
'
s
controllers
and
styles
with
the
parent
project
using
these
commands
:
###
register
-
external
-
controllers
Registers
a
module
'
s
stimulus
controllers
directory
with
the
parent
project
'
s
`
sealgen
.
controllerDirs
`
configuration
.
```
bash
npx
sealgen
register
-
external
-
controllers
<
module
-
name
>
<
subdirectory
>
```
Example
:
```
bash
npx
sealgen
register
-
external
-
controllers
my
-
module
src
/
stimulus
-
controllers
```
This
will
add
`
node_modules
/
my
-
module
/
src
/
stimulus
-
controllers
`
to
the
parent
project
'
s
`
package
.
json
`
sealgen
configuration
.
###
register
-
external
-
styles
Registers
a
module
'
s
styles
directory
with
the
parent
project
'
s
`
sealgen
.
styleDirs
`
configuration
.
```
bash
npx
sealgen
register
-
external
-
styles
<
module
-
name
>
<
subdirectory
>
```
Example
:
```
bash
npx
sealgen
register
-
external
-
styles
my
-
module
src
/
styles
```
This
will
add
`
node_modules
/
my
-
module
/
src
/
styles
`
to
the
parent
project
'
s
`
package
.
json
`
sealgen
configuration
.
###
Usage
in
Module
Development
You
can
add
these
commands
to
your
module
'
s
`
package
.
json
`
postinstall
script
to
automatically
register
your
controllers
and
styles
when
the
module
is
installed
:
```
json
{
"name"
:
"my-module"
,
"scripts"
:
{
"postinstall"
:
"npx sealgen register-external-controllers my-module src/stimulus-controllers && npx sealgen register-external-styles my-module src/styles"
}
}
```
###
How
It
Works
1
.
The
command
traverses
up
the
directory
tree
from
the
current
working
directory
2
.
It
looks
for
a
`
package
.
json
`
file
that
contains
a
`
sealgen
`
configuration
3
.
It
adds
the
specified
path
to
the
appropriate
array
(
`
controllerDirs
`
or
`
styleDirs
`
)
4
.
If
the
`
sealgen
`
configuration
doesn
'
t
exist
,
it
creates
it
5
.
If
the
path
is
already
present
,
it
doesn
'
t
add
a
duplicate
This
ensures
that
when
your
module
is
installed
as
a
dependency
,
the
parent
project
will
automatically
know
where
to
find
your
controllers
and
styles
.
###
Attributions
File
icon
-
Gnome
Project
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 27, 17:30 (1 d, 16 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1182973
Default Alt Text
README.md (2 KB)
Attached To
Mode
rSGEN sealgen
Attached
Detach File
Event Timeline