diff --git a/GNUmakefile b/GNUmakefile index 815c4a8..059826b 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -5,6 +5,6 @@ all: $(patsubst %.ometajs,%.ometajs.js,$(shell find lib -name '*.ometajs')) ometajs2js -i $< -o $@ tests: - ./bin/borschik -t ./lib/techs/css.js -i tests/a.css -o tests/_a.css + ./bin/borschik -t css -i tests/a.css -o tests/_a.css .PHONY: all tests diff --git a/lib/borschik.js b/lib/borschik.js index 8ce9d87..cc6bdd3 100644 --- a/lib/borschik.js +++ b/lib/borschik.js @@ -16,7 +16,10 @@ exports.COA = require('coa').Cmd() .short('t').long('tech') .def(__dirname + '/tech.js') .val(function(t) { - return new (require(PATH.resolve(t)).Tech)() }) + t = /^[^.][^\/]*$/g.test(t) ? + __dirname + '/techs/' + t + '.js' : + PATH.resolve(t); + return new (require(t).Tech)() }) .end() .opt() .name('input').title('Input path, required')