Sha256: 2eeaf112215917860d47ec1e3ae34c9a081fb8bc42342dbdcd1ec56e11c1430b

Contents?: true

Size: 564 Bytes

Versions: 3

Compression:

Stored size: 564 Bytes

Contents

require "thor"

module Hajimeru
  module Generator
    class JavaScript < Thor::Group
      include Thor::Actions

      argument :name

      def self.source_root
        File.join(File.dirname(__FILE__), "templates", "javascript")
      end

      def create_files
        [
        ].each do |path|
          template("#{path}.tt", "#{name}/#{path}")
        end
      end

      def copy_files
        [
          "index.html",
          "index.js",
        ].each do |path|
          copy_file(path, "#{name}/#{path}")
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hajimeru-0.1.3 lib/hajimeru/generator/javascript.rb
hajimeru-0.1.2 lib/hajimeru/generator/javascript.rb
hajimeru-0.1.1 lib/hajimeru/generator/javascript.rb