Sha256: 8fd44372dee324ac904f62ea7ee21eed2aaef398bb9ebd18ec41cdcd4537f88c

Contents?: true

Size: 1002 Bytes

Versions: 18

Compression:

Stored size: 1002 Bytes

Contents

require 'rails/generators'

module RocketCms
  class WebpackGenerator < Rails::Generators::Base
    source_root File.expand_path('../templates', __FILE__)
    def app_name
      Rails.application.class.name.split("::")[0]
    end

    desc 'RocketCMS webpack generator'
    def install
      copy_file ".babelrc", ".babelrc"
      copy_file "webpack.config.js", "config/webpack.config.js"

      copy_file "webpack/application.es6", "webpack/application.es6"
      copy_file "webpack/application.sass", "webpack/application.sass"

      copy_file "webpack/errors/index.es6", "webpack/errors/index.es6"
      copy_file "webpack/errors/index.sass", "webpack/errors/index.sass"
      copy_file "webpack/errors/errors.handlebars", "webpack/errors/errors.handlebars"

      copy_file "webpack/flash/index.es6", "webpack/flash/index.es6"
      copy_file "webpack/flash/index.sass", "webpack/flash/index.sass"

      remove_file "package.json"
      template "package.json", "package.json"
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
rocket_cms-0.24.0 lib/generators/rocket_cms/webpack_generator.rb
rocket_cms-0.22.0 lib/generators/rocket_cms/webpack_generator.rb
rocket_cms-0.21.1 lib/generators/rocket_cms/webpack_generator.rb
rocket_cms-0.21.0 lib/generators/rocket_cms/webpack_generator.rb
rocket_cms-0.20.1 lib/generators/rocket_cms/webpack_generator.rb
rocket_cms-0.20.0 lib/generators/rocket_cms/webpack_generator.rb
rocket_cms-0.19.8 lib/generators/rocket_cms/webpack_generator.rb
rocket_cms-0.19.7 lib/generators/rocket_cms/webpack_generator.rb
rocket_cms-0.19.6 lib/generators/rocket_cms/webpack_generator.rb
rocket_cms-0.19.4 lib/generators/rocket_cms/webpack_generator.rb
rocket_cms-0.19.3 lib/generators/rocket_cms/webpack_generator.rb
rocket_cms-0.19.2 lib/generators/rocket_cms/webpack_generator.rb
rocket_cms-0.19.1 lib/generators/rocket_cms/webpack_generator.rb
rocket_cms-0.19.0 lib/generators/rocket_cms/webpack_generator.rb
rocket_cms-0.18.5 lib/generators/rocket_cms/webpack_generator.rb
rocket_cms-0.18.4 lib/generators/rocket_cms/webpack_generator.rb
rocket_cms-0.18.3 lib/generators/rocket_cms/webpack_generator.rb
rocket_cms-0.18.2 lib/generators/rocket_cms/webpack_generator.rb