mirror of
https://github.com/facundoolano/jorge.git
synced 2024-11-16 07:47:40 +01:00
add --no-minify to jorge build
This commit is contained in:
parent
23b6bc4cce
commit
ac83d47f71
2 changed files with 2 additions and 1 deletions
|
@ -17,6 +17,7 @@ const DIR_RWE_MODE = 0777
|
|||
|
||||
type Build struct {
|
||||
ProjectDir string `arg:"" name:"path" optional:"" default:"." help:"Path to the website project to build."`
|
||||
NoMinify bool `help:"Disable file minifying."`
|
||||
}
|
||||
|
||||
// Read the files in src/ render them and copy the result to target/
|
||||
|
@ -27,6 +28,7 @@ func (cmd *Build) Run(ctx *kong.Context) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
config.Minify = !cmd.NoMinify
|
||||
|
||||
err = site.Build(*config)
|
||||
fmt.Printf("done in %.2fs\n", time.Since(start).Seconds())
|
||||
|
|
|
@ -26,7 +26,6 @@ func LoadMinifier() Minifier {
|
|||
return Minifier{minifier}
|
||||
}
|
||||
|
||||
// if enabled by config, minify web files
|
||||
func (m *Minifier) Minify(extension string, contentReader io.Reader) io.Reader {
|
||||
|
||||
if !slices.Contains(SUPPORTED_MINIFIERS, extension) {
|
||||
|
|
Loading…
Reference in a new issue