Sha256: a561dc435cf58d9be9e00a455a933c412a4d052b9213706d28c4efda33ed94f1

Contents?: true

Size: 1.45 KB

Versions: 18

Compression:

Stored size: 1.45 KB

Contents

#-------------------------------------------------------------------------------
#
#    Author: <%= project.author %>
# Copyright: <%= project.copyright %>
#   License: <%= project.license %>
#
#-------------------------------------------------------------------------------

require 'json'

require 'extensions.rb'
require 'sketchup.rb'

<%= project.namespace.open %>

  file = __FILE__.dup
  # Account for Ruby encoding bug under Windows.
  file.force_encoding('UTF-8') if file.respond_to?(:force_encoding)
  # Support folder should be named the same as the root .rb file.
  folder_name = File.basename(file, '.*')

  # Path to the root .rb file (this file).
  PATH_ROOT = File.dirname(file).freeze

  # Path to the support folder.
  PATH = File.join(PATH_ROOT, folder_name).freeze

  # Extension information.
  extension_json_file = File.join(PATH, 'extension.json')
  extension_json = File.read(extension_json_file)
  EXTENSION = ::JSON.parse(extension_json, symbolize_names: true).freeze

  unless file_loaded?(__FILE__)
    loader = File.join(PATH, 'main')
    @extension = SketchupExtension.new(EXTENSION[:name], loader)
    @extension.description = EXTENSION[:description]
    @extension.version     = EXTENSION[:version]
    @extension.copyright   = EXTENSION[:copyright]
    @extension.creator     = EXTENSION[:creator]
    Sketchup.register_extension(@extension, true)
  end

<%= project.namespace.close %>

file_loaded(__FILE__)

Version data entries

18 entries across 9 versions & 1 rubygems

Version Path
skippy-0.5.2.a app/templates/standard/%ext_name%.rb.tt
skippy-0.5.2.a app/templates/webdialog/%ext_name%.rb.tt
skippy-0.5.1.a app/templates/standard/%ext_name%.rb.tt
skippy-0.5.1.a app/templates/webdialog/%ext_name%.rb.tt
skippy-0.5.0.a app/templates/webdialog/%ext_name%.rb.tt
skippy-0.5.0.a app/templates/standard/%ext_name%.rb.tt
skippy-0.4.3.a app/templates/standard/%ext_name%.rb.tt
skippy-0.4.3.a app/templates/webdialog/%ext_name%.rb.tt
skippy-0.4.2.a app/templates/webdialog/%ext_name%.rb.tt
skippy-0.4.2.a app/templates/standard/%ext_name%.rb.tt
skippy-0.4.1.a app/templates/webdialog/%ext_name%.rb.tt
skippy-0.4.1.a app/templates/standard/%ext_name%.rb.tt
skippy-0.4.0.a app/templates/webdialog/%ext_name%.rb.tt
skippy-0.4.0.a app/templates/standard/%ext_name%.rb.tt
skippy-0.3.0.a app/templates/standard/%ext_name%.rb.tt
skippy-0.3.0.a app/templates/webdialog/%ext_name%.rb.tt
skippy-0.2.0.a app/templates/webdialog/%ext_name%.rb.tt
skippy-0.2.0.a app/templates/standard/%ext_name%.rb.tt