diff --git a/compile.go b/compile.go index 9a4a042..6e75e12 100644 --- a/compile.go +++ b/compile.go @@ -104,7 +104,7 @@ func finalize(config Config, buf map[FileType]*bytes.Buffer) (map[FileType]*Comp return nil, err } - destFile := filepath.Join(dir, "app-"+ret[key].Hash+ext) + destFile := filepath.Join(dir, config.FilePrefix+ret[key].Hash+ext) if err := ioutil.WriteFile(destFile, bytes, 0644); err != nil { return nil, err } diff --git a/config.go b/config.go index 691eda2..3c5ef23 100644 --- a/config.go +++ b/config.go @@ -8,4 +8,6 @@ type Config struct { Minify bool // OutputDir if specified will cause the result to be written to this directory OutputDir string + // FilePrefix is a string that will be prefixed on the files if OutputDir is specified + FilePrefix string }