Sha256: 8ece05137566854919f0debcfa20a8aaa1414bf2b9ba9db31e71e28feb4fc13f
Contents?: true
Size: 960 Bytes
Versions: 4
Compression:
Stored size: 960 Bytes
Contents
class JasmineDev < Thor desc "build_github_pages", "Build static pages for pivotal.github.com/jasmine" def build_github_pages(pages_dir = File.expand_path(File.join('.', 'pages'))) say JasmineDev.spacer say "Building Github Pages...", :cyan return unless pages_submodule_installed? project_lib_dir = File.join(JasmineDev.project_root, 'lib', 'jasmine-core') pages_lib_dir = File.join(pages_dir, 'lib') FileUtils.rm_r(pages_lib_dir) if File.exist?(pages_lib_dir) ['jasmine.js', 'jasmine-html.js', 'jasmine.css'].each do |file| copy_file File.join(project_lib_dir, file), File.join(pages_lib_dir, file) end inside File.join(JasmineDev.project_root, 'pages', 'src') do run_with_output "bundle exec rocco -l js introduction.js -t layout.mustache -o #{pages_dir}" end inside pages_dir do copy_file File.join(pages_dir,'introduction.html'), File.join(pages_dir,'index.html') end end end
Version data entries
4 entries across 4 versions & 1 rubygems