Sha256: 249d34f103ec2418c3198143be213e3097c5106656beb7657bf50ef6a9aa1d56

Contents?: true

Size: 1.16 KB

Versions: 14

Compression:

Stored size: 1.16 KB

Contents

require 'rake'

module RevealCK
  module Builders
    # Given a copy of reveal.js, this class knows which files are
    # vital to the presentation.
    class RevealJsFiles
      include Retrieve

      attr_reader :dir

      def initialize(args)
        @dir = retrieve(:dir, args)
      end

      def files
        []
          .concat(css)
          .concat(js)
          .concat(lib)
          .concat(plugin)
          .concat(meta)
          .concat(index)
      end

      private

      def css
        FileList["#{dir}/css/reveal.css",
                 "#{dir}/css/print/*",
                 "#{dir}/css/theme/*.css"]
      end

      def js
        FileList["#{dir}/js/reveal.js"]
      end

      def lib
        FileList["#{dir}/lib/**/*.css",
                 "#{dir}/lib/font/**/*",
                 "#{dir}/lib/**/*.js"]
      end

      def plugin
        FileList["#{dir}/plugin/**/*.js",
                 "#{dir}/plugin/**/*.html"]
      end

      def meta
        FileList["#{dir}/README.md",
                 "#{dir}/LICENSE",
                 "#{dir}/package.json"]
      end

      def index
        FileList["#{dir}/index.html"]
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
reveal-ck-4.0.0 lib/reveal-ck/builders/reveal_js_files.rb
reveal-ck-3.9.2 lib/reveal-ck/builders/reveal_js_files.rb
reveal-ck-3.9.1 lib/reveal-ck/builders/reveal_js_files.rb
reveal-ck-3.9.0 lib/reveal-ck/builders/reveal_js_files.rb
reveal-ck-3.8.1 lib/reveal-ck/builders/reveal_js_files.rb
reveal-ck-3.8.0 lib/reveal-ck/builders/reveal_js_files.rb
reveal-ck-3.7.0 lib/reveal-ck/builders/reveal_js_files.rb
reveal-ck-3.6.0 lib/reveal-ck/builders/reveal_js_files.rb
reveal-ck-3.5.1 lib/reveal-ck/builders/reveal_js_files.rb
reveal-ck-3.5.0 lib/reveal-ck/builders/reveal_js_files.rb
reveal-ck-3.4.0 lib/reveal-ck/builders/reveal_js_files.rb
reveal-ck-3.3.1 lib/reveal-ck/builders/reveal_js_files.rb
reveal-ck-3.3.0 lib/reveal-ck/builders/reveal_js_files.rb
reveal-ck-3.2.0 lib/reveal-ck/builders/reveal_js_files.rb