From 97b8c13d804b34207e507b68fef1604d18d8d662 Mon Sep 17 00:00:00 2001 From: mgarciaisaia Date: Thu, 27 Oct 2016 02:28:33 -0300 Subject: [PATCH] -I supports shell globs Fixes #1 --- example/Makefile | 2 +- src/resolver.cr | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/example/Makefile b/example/Makefile index d63a502..fd912ca 100644 --- a/example/Makefile +++ b/example/Makefile @@ -1,6 +1,6 @@ .PHONY: all clean -MPP = ../bin/mpp -Iassets/css -Iassets/js +MPP = ../bin/mpp -Iassets/* all: css/root.css js/root.js diff --git a/src/resolver.cr b/src/resolver.cr index c9e1115..fba8c60 100644 --- a/src/resolver.cr +++ b/src/resolver.cr @@ -21,7 +21,7 @@ class Resolver end def add(paths : Array(String)) - @search_paths.concat(paths.map { |path| File.expand_path(path) }) + paths.each { |path| Dir.glob(path) { |file| @search_paths << File.expand_path(file) } } end private def find(path)