Ver Código Fonte

support running coffeescript.

nothing more, but they run. :)
Lucas Stadler 11 anos atrás
pai
commit
38bec80d80
2 arquivos alterados com 6 adições e 0 exclusões
  1. 5 0
      go/detect/detect.go
  2. 1 0
      go/examples/hello.coffee

+ 5 - 0
go/detect/detect.go

@ -23,6 +23,7 @@ var ProjectTypes = []*Project{
23 23
	&Project{"c/default", Commands{"run": "gcc -o $(basename {file} .c) {file} && ./$(basename {file} .c)"}, cDefault},
24 24
	&Project{"clojure/leiningen", Commands{"build": "lein uberjar", "run": "lein run", "test": "lein test"},
25 25
		clojureLeiningen},
26
	&Project{"coffeescript/default", Commands{"run": "coffee {file}"}, coffeescriptDefault},
26 27
	&Project{"docker/fig", Commands{"build": "fig build", "run": "fig up"}, dockerFig},
27 28
	&Project{"docker/default", Commands{"build": "docker build ."}, dockerDefault},
28 29
	&Project{"executable", Commands{"run": "{file}"}, executableDefault},
@ -100,6 +101,10 @@ func clojureLeiningen(file string) bool {
100 101
	return hasFile(file, "project.clj")
101 102
}
102 103
104
func coffeescriptDefault(file string) bool {
105
	return matchingFileOrDir(file, "*.coffee")
106
}
107
103 108
func dockerFig(file string) bool {
104 109
	return hasFile(file, "fig.yml")
105 110
}

+ 1 - 0
go/examples/hello.coffee

@ -0,0 +1 @@
1
console.log "Hello, World!"