Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include things like github.com/foo.js or janl/github.com.js #85

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions bin/djsd
Original file line number Diff line number Diff line change
Expand Up @@ -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/github.com.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

Expand Down