Sha256: 9e6f17e1554030300eaa5bbdcd92f91719b0ca22408ebf6e46d8a36f31c524e8

Contents?: true

Size: 797 Bytes

Versions: 2

Compression:

Stored size: 797 Bytes

Contents

module Pah
  module Templates
    class Bourbon < Pah::Template
      def call
        css_path = 'app/assets/stylesheets/'
        application_css_path = "#{css_path}application.css"

        prepend_to_file application_css_path do
        <<IMPORTS
@import 'bourbon';
@import 'base/base';
@import 'neat';
IMPORTS
      end

        gsub_file application_css_path, /\*= require_tree \./, '*'

        inside(css_path) do
          system 'bundle exec bitters install'
        end

        gsub_file "#{css_path}base/_base.scss", %r{// @import 'grid-settings';}, "@import 'grid-settings';"

        system "mv #{application_css_path} #{css_path}application.css.scss"

        git rm: application_css_path
        git add: css_path
        git_commit 'Install bourbon.'
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pah-0.0.17 lib/pah/templates/bourbon.rb
pah-0.0.16 lib/pah/templates/bourbon.rb