Sha256: c619d003cd211abbb74708da3ffd54b8df4d12e2f34f2f34e6634218dc4c97ca

Contents?: true

Size: 1.16 KB

Versions: 6

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.min.css",
                 "#{dir}/css/print/*",
                 "#{dir}/css/theme/*.css"]
      end

      def js
        FileList["#{dir}/js/reveal.min.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

6 entries across 6 versions & 1 rubygems

Version Path
reveal-ck-0.5.1 lib/reveal-ck/builders/reveal_js_files.rb
reveal-ck-0.5.0 lib/reveal-ck/builders/reveal_js_files.rb
reveal-ck-0.4.2 lib/reveal-ck/builders/reveal_js_files.rb
reveal-ck-0.4.1 lib/reveal-ck/builders/reveal_js_files.rb
reveal-ck-0.4.0 lib/reveal-ck/builders/reveal_js_files.rb
reveal-ck-0.3.0 lib/reveal-ck/builders/reveal_js_files.rb