Sha256: f133ed46c18077b846aa00d81b386fef353602e837b2a0b201a34496cfc3cbab

Contents?: true

Size: 1011 Bytes

Versions: 2

Compression:

Stored size: 1011 Bytes

Contents

# frozen_string_literal: true

require 'ember/handlebars/template'
require 'active_model_serializers'
require 'ember/es6_template'
require 'ember/cli/assets'

require 'sprockets/railtie'

module Ember
  module Rails
    class Engine < ::Rails::Engine
      Ember::Handlebars::Template.configure do |handlebars_config|
        config.handlebars = handlebars_config

        config.handlebars.precompile = true
        config.handlebars.templates_root = 'templates'
        config.handlebars.templates_path_separator = '/'
        config.handlebars.output_type = :global
        config.handlebars.ember_template = Ember::VERSION =~ /\A1.[0-9]\./ ? 'Handlebars' : 'HTMLBars'
      end

      config.before_initialize do |_app|
        Ember::ES6Template.configure do |ember_config|
          ember_config.module_prefix = config.ember.module_prefix
          ember_config.prefix_files = config.ember.prefix_files
          ember_config.prefix_dirs = config.ember.prefix_dirs
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
emberjs-rails-0.1.1 lib/ember/rails/engine.rb
emberjs-rails-0.1.0 lib/ember/rails/engine.rb