Skip to content

Commit 15199ff

Browse files
authored
chore: updated storybook installation command with a features flag (#1185)
1 parent 7df55ec commit 15199ff

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

storybook/storybook.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"context"
66
"encoding/json"
77
"fmt"
8+
"log/slog"
89
"math"
910
"net/http"
1011
"net/url"
@@ -20,7 +21,6 @@ import (
2021
"golang.org/x/mod/sumdb/dirhash"
2122

2223
_ "embed"
23-
"log/slog"
2424

2525
"github.com/a-h/templ"
2626
"github.com/rs/cors"
@@ -94,7 +94,7 @@ func New(conf ...StorybookConfig) *Storybook {
9494
}
9595

9696
func (sh *Storybook) AddComponent(name string, componentConstructor any, args ...Arg) *Conf {
97-
//TODO: Check that the component constructor is a function that returns a templ.Component.
97+
// TODO: Check that the component constructor is a function that returns a templ.Component.
9898
c := NewConf(name, args...)
9999
sh.Config[name] = c
100100
h := NewHandler(name, componentConstructor, args...)
@@ -232,7 +232,7 @@ func (sh *Storybook) installStorybook() (err error) {
232232
if err != nil {
233233
return fmt.Errorf("templ-storybook: cannot install storybook, cannot find npx on the path, check that Node.js is installed: %w", err)
234234
}
235-
cmd.Args = []string{"npx", "sb", "init", "-t", "server", "--no-dev"}
235+
cmd.Args = []string{"npx", "sb", "init", "--features", "docs", "test", "-t", "server", "--no-dev"}
236236
return cmd.Run()
237237
}
238238

0 commit comments

Comments
 (0)