Skip to content

Commit

Permalink
fix 'only generation of JSON objects or arrays' allowed error
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeyKishenin committed Nov 12, 2013
1 parent ba50e52 commit 8465b06
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/bower-rails/dsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,14 @@ def write_bower_json
def generate_dotbowerrc
contents = JSON.parse(File.read(File.join(@root_path, '.bowerrc'))) rescue {}
contents["directory"] = "bower_components"
JSON.pretty_generate(contents)
end

def write_dotbowerrc
groups.map do |g|
g_norm = normalize_location_path(g.first, group_assets_path(g))
File.open(File.join(g_norm, ".bowerrc"), "w") do |f|
f.write(JSON.pretty_generate(generate_dotbowerrc))
f.write(generate_dotbowerrc)
end
end
end
Expand Down

0 comments on commit 8465b06

Please sign in to comment.