You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: src/main/groovy/muddler/App.groovy
+46-1
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,7 @@ class App {
25
25
v longOpt: 'version', 'Print version information and exit'
26
26
g longOpt: 'generate', 'Create a new muddler project by answering some questions.'
27
27
d longOpt: 'default', 'Create a new default muddler template project named MyProject in the MyProject directory'
28
+
w longOpt: 'watch', 'Watch the src directory for changes and rebuild the package when they occur'
28
29
}
29
30
def options = cli.parse(args)
30
31
if (!options) {
@@ -54,6 +55,18 @@ class App {
54
55
return
55
56
}
56
57
58
+
build()
59
+
60
+
if (options.w) {
61
+
watch()
62
+
return
63
+
}
64
+
65
+
System.exit(0)
66
+
}
67
+
68
+
staticvoidbuild() {
69
+
def e =newEcho()
57
70
def srcDir =newFile('./src')
58
71
if (!srcDir.exists()) {
59
72
println"muddler requires a src directory to read your package contents from, and cannot find it. Please see https://github.com/demonnic/muddler#usage for more information on the file layout for muddler."
0 commit comments