diff --git a/Rakefile b/Rakefile index 5996019..1351560 100644 --- a/Rakefile +++ b/Rakefile @@ -71,7 +71,7 @@ namespace :install do desc "Install Google Chrome extension" task :chrome do - puts "", "\e[31mIMPORTANT!\e[0m Drag builds/dotjs.crx to Google Chrome." + puts "", "\e[31mIMPORTANT!\e[0m Open chrome://extensions in Google Chrome and drag builds/dotjs.crx to the list of extensions." puts "Chrome won't let me install it for you :(", "" end end diff --git a/bin/djsd b/bin/djsd index 8689dc1..6c68664 100755 --- a/bin/djsd +++ b/bin/djsd @@ -32,6 +32,11 @@ dotjs = Class.new(WEBrick::HTTPServlet::AbstractServlet) do until paths.empty? file = File.expand_path(paths.join('.')) files << file if File.file?(file) + # Include files like github.com/pull-request.js or janl/git.colasdn.top.js, + # for modularity and including gists or other people's dotjs files as + # subdirs + files = files.concat(Dir.glob('**/' + paths.join('.').sub(/.js$/, '/**/*.js'))) + files = files.concat(Dir.glob('**/' + paths.join('.'))) paths.shift end