Skip to content

Commit

Permalink
Merge pull request #79 from davidanthoff/fileio_exports
Browse files Browse the repository at this point in the history
Export FileIO load and save function
  • Loading branch information
davidanthoff committed Jun 1, 2018
2 parents 8ba5554 + 47fafda commit 09f86cd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Rsvg
IteratorInterfaceExtensions 0.0.1
TableTraits 0.0.2
IterableTables
FileIO
FileIO 0.9.0
Juno
DataValues
MacroTools
Expand Down
3 changes: 2 additions & 1 deletion src/VegaLite.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module VegaLite
using JSON, Compat, Requires, NodeJS, Cairo, Rsvg, NamedTuples # 6s
import IteratorInterfaceExtensions # 1s
import TableTraits # 0
import FileIO # 17s !!!
using FileIO # 17s !!!
import DataValues # 1s
import MacroTools
using URIParser
Expand All @@ -17,6 +17,7 @@ import IterableTables

export renderer, actionlinks
export png, svg, jgp, pdf, savefig, loadspec, savespec, @vl_str, @vlplot
export load, save

export mk, enc

Expand Down
4 changes: 2 additions & 2 deletions src/rendering/fileio.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function load(f::FileIO.File{FileIO.format"vegalite"})
function fileio_load(f::FileIO.File{FileIO.format"vegalite"})
return loadspec(f.filename)
end

function save(file::FileIO.File{FileIO.format"vegalite"}, data::VLSpec{:plot}; include_data=false)
function fileio_save(file::FileIO.File{FileIO.format"vegalite"}, data::VLSpec{:plot}; include_data=false)
savespec(file.filename, data, include_data=include_data)
end

0 comments on commit 09f86cd

Please sign in to comment.