-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.go
36 lines (28 loc) · 815 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package main
import (
"flag"
"log"
"wp-bundler/config"
"wp-bundler/zipper"
)
var (
configPath string
verbose bool
source_dir string
)
func main() {
flag.StringVar(&configPath, "config", "config.toml", "Path to config file")
flag.BoolVar(&verbose, "vv", false, "Get Verbose")
flag.StringVar(&source_dir, "source", "dist", "Provide the source directory, will be searched for config.toml")
flag.Parse()
config.Init(config.ConfigOptions{
ConfigPath: configPath,
Verbose: verbose,
SourceDir: source_dir,
})
zipper.Init(config.Config)
log.Println("Application is using source dir:", config.Config.Bundler.SourceDir)
log.Println("Application is using ignore file:", config.Config.Bundler.IgnoreFile)
zipper.ZipWriter.Write(config.Config.Bundler.SourceDir)
zipper.ZipWriter.Close()
}