Explorar el Código

support running npm packages and procfiles.

both are a bit daring, but they might work. :)
Lucas Stadler %!s(int64=11) %!d(string=hace) años
padre
commit
6347d5ebcb
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  1. 3 2
      go/detect/detect.go

+ 3 - 2
go/detect/detect.go

38
	&Project{"idris/default", Commands{"run": "idris -o $(basename {file} .idr) {file} && ./$(basename {file} .idr)"},
38
	&Project{"idris/default", Commands{"run": "idris -o $(basename {file} .idr) {file} && ./$(basename {file} .idr)"},
39
		matchPattern("*.idr")},
39
		matchPattern("*.idr")},
40
	&Project{"java/maven", Commands{"build": "mvn compile", "test": "mvn compile test"}, matchFile("pom.xml")},
40
	&Project{"java/maven", Commands{"build": "mvn compile", "test": "mvn compile test"}, matchFile("pom.xml")},
41
	&Project{"javascript/npm", Commands{"build": "npm install", "test": "npm test"}, matchFile("package.json")},
41
	&Project{"javascript/npm", Commands{"build": "npm install", "run": "npm start", "test": "npm test"},
42
		matchFile("package.json")},
42
	&Project{"javascript/meteor", Commands{"run": "meteor"}, matchFile(".meteor/.id")},
43
	&Project{"javascript/meteor", Commands{"run": "meteor"}, matchFile(".meteor/.id")},
43
	&Project{"javascript/default", Commands{"run": "node {file}"}, matchPattern("*.js")},
44
	&Project{"javascript/default", Commands{"run": "node {file}"}, matchPattern("*.js")},
44
	&Project{"julia/default", Commands{"run": "julia {file}"}, matchPattern("*.jl")},
45
	&Project{"julia/default", Commands{"run": "julia {file}"}, matchPattern("*.jl")},
54
	&Project{"rust/default", Commands{"run": "rustc {file} && ./$(basename {file} .rs)"}, matchPattern("*.rs")},
55
	&Project{"rust/default", Commands{"run": "rustc {file} && ./$(basename {file} .rs)"}, matchPattern("*.rs")},
55
	&Project{"cmake", Commands{"build": "mkdir .build && cd .build && cmake .. && make"}, matchFile("CMakeLists.txt")},
56
	&Project{"cmake", Commands{"build": "mkdir .build && cd .build && cmake .. && make"}, matchFile("CMakeLists.txt")},
56
	&Project{"make", Commands{"run": "make", "test": "make test"}, matchFile("Makefile")},
57
	&Project{"make", Commands{"run": "make", "test": "make test"}, matchFile("Makefile")},
57
	&Project{"procfile", Commands{}, matchFile("Procfile")},
58
	&Project{"procfile", Commands{"run": "$(sed -n 's/^web: //p' Procfile)"}, matchFile("Procfile")},
58
}
59
}
59
60
60
func Detect(file string) (*Project, error) {
61
func Detect(file string) (*Project, error) {