diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..db6a62d --- /dev/null +++ b/Gemfile @@ -0,0 +1,7 @@ +source 'https://rubygems.org' + +gem 'sinatra', '~> 1.4' +gem 'slim' +gem 'coffee-script' +gem 'therubyracer' +gem 'sass' diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..ce22866 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,36 @@ +GEM + remote: https://rubygems.org/ + specs: + coffee-script (2.3.0) + coffee-script-source + execjs + coffee-script-source (1.8.0) + execjs (2.2.2) + libv8 (3.16.14.7) + rack (1.5.2) + rack-protection (1.5.3) + rack + ref (1.0.5) + sass (3.2.19) + sinatra (1.4.5) + rack (~> 1.4) + rack-protection (~> 1.4) + tilt (~> 1.3, >= 1.3.4) + slim (2.1.0) + temple (~> 0.6.9) + tilt (>= 1.3.3, < 2.1) + temple (0.6.10) + therubyracer (0.12.1) + libv8 (~> 3.16.14.0) + ref + tilt (1.4.1) + +PLATFORMS + ruby + +DEPENDENCIES + coffee-script + sass + sinatra (~> 1.4) + slim + therubyracer diff --git a/nikoli.rb b/nikoli.rb new file mode 100755 index 0000000..56eea4b --- /dev/null +++ b/nikoli.rb @@ -0,0 +1,15 @@ +#!/usr/bin/env ruby + +require 'sinatra' +require 'coffee-script' +require 'slim' +require 'sass' + +get('/application.css') { scss :application } + +get('/') { slim :index } + +%i{nurikabe}.each do |game| + get("/#{game}") { slim game } + get("/#{game}.js") { coffee game } +end diff --git a/nurikabe.html b/views/application.scss similarity index 50% rename from nurikabe.html rename to views/application.scss index 7389c8d..5002fe1 100644 --- a/nurikabe.html +++ b/views/application.scss @@ -1,10 +1,3 @@ - - -
-