Sha256: 24135448854b2044598cb95918b83608583cc373c28f94859527fa3aff276a2e
Contents?: true
Size: 1.01 KB
Versions: 8
Compression:
Stored size: 1.01 KB
Contents
module PageflowScrolled module Generators # @api private class InstallGenerator < Rails::Generators::Base desc 'Installs Pageflow Scrolled entry type.' def install_webpacker require 'webpacker' gemfile = File.expand_path('../../../../../../Gemfile', __dir__) rake "webpacker:install BUNDLE_GEMFILE=#{gemfile}" end def webpack_environment inject_into_file('config/webpack/environment.js', before: "module.exports = environment\n") do "const pageflowConfig = require('pageflow/config/webpack')\n" \ "environment.config.merge(pageflowConfig)\n\n" end end def editor_pack create_file 'app/javascript/packs/pageflow-scrolled-editor.js', <<-JS import 'pageflow-scrolled/editor'; JS end def frontend_pack create_file 'app/javascript/packs/pageflow-scrolled-frontend.js', <<-JS import 'pageflow-scrolled/frontend'; JS end end end end
Version data entries
8 entries across 8 versions & 1 rubygems