File tree Expand file tree Collapse file tree 1 file changed +25
-17
lines changed
Expand file tree Collapse file tree 1 file changed +25
-17
lines changed Original file line number Diff line number Diff line change 1818# -----------------------------------------------------------------------
1919
2020module MoonScript
21- class ArtifactCleaner
22- def self.clean (clean_packages: Bool = false )
23- artifcats = if clean_packages[MOONSCRIPT_PACKAGE_DIR ]
24- else
25- %w[.ms dist]
26- end
27-
28- if artifacts.any?(&- > Dir .exists?(String ))
29- artifacts.each do |artifact |
30- Dir .safe_delete artifcat do
31- terminals.puts " Deleting: #{ artifact } "
32- end
33- end
34- else
35- terminals.puts " [LOG]: Nothing to delete here..."
36- end
21+ class ArtifactCleaner
22+ def self.clean (clean_packages : Bool = false )
23+
24+ artifacts =
25+ if clean_packages
26+ [MOONSCRIPT_PACKAGES_DIR ]
27+ else
28+ %w[.ms dist]
29+ end
30+
31+ if artifacts.any?(&- > Dir .exists?(String ))
32+ artifacts.each do |artifact |
33+ Dir .safe_delete artifact do
34+ terminal.puts " [LOG]: Deleting: #{ artifact } ... 😀"
35+ end
3736 end
37+ else
38+ terminal.puts " [LOG]: Nothing to delete... 😀"
39+ end
40+ end
41+
42+ def self.terminal
43+ Render ::Terminal ::STDOUT
3844 end
39- end
45+
46+ end
47+ end
You can’t perform that action at this time.
0 commit comments