Skip to content

Commit

Permalink
Generate the proper lib files to make bourbon watch work
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil LaPier committed Jan 20, 2012
1 parent c2077d8 commit 0ebf906
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
6 changes: 4 additions & 2 deletions features/step_definitions/bourbon_steps.rb
Expand Up @@ -22,8 +22,10 @@
end

Then /^the lib files should have been generated$/ do
check_file_presence(["bourbon/lib/sass_extensions.rb"], true)
check_directory_presence(["bourbon/lib/sass_extensions"], true)
check_file_presence(["bourbon/lib/bourbon.rb"], true)
check_directory_presence(["bourbon/lib/bourbon"], true)
check_file_presence(["bourbon/lib/bourbon/sass_extensions.rb"], true)
check_directory_presence(["bourbon/lib/bourbon/sass_extensions"], true)
end

Then /^bourbon should not have been generated$/ do
Expand Down
11 changes: 8 additions & 3 deletions lib/bourbon/generator.rb
Expand Up @@ -50,12 +50,13 @@ def remove_bourbon_directory
end

def make_lib_directory
FileUtils.mkdir_p("bourbon/lib")
FileUtils.mkdir_p("bourbon/lib/bourbon")
end

def copy_in_sass_extensions
FileUtils.cp(File.join(lib_directory, "sass_extensions.rb"), "bourbon/lib/")
FileUtils.cp_r(File.join(lib_directory, "sass_extensions"), "bourbon/lib/")
FileUtils.cp(File.join(lib_directory, "bourbon.rb"), "bourbon/lib/")
FileUtils.cp(File.join(lib_bourbon_directory, "sass_extensions.rb"), "bourbon/lib/bourbon/")
FileUtils.cp_r(File.join(lib_bourbon_directory, "sass_extensions"), "bourbon/lib/bourbon/")
end

def copy_in_scss_files
Expand All @@ -71,6 +72,10 @@ def stylesheets_directory
end

def lib_directory
File.join(top_level_directory, "lib")
end

def lib_bourbon_directory
File.join(top_level_directory, "lib", "bourbon")
end

Expand Down

0 comments on commit 0ebf906

Please sign in to comment.