Skip to content

Commit

Permalink
Add prismic dependency, create data dir if none exists
Browse files Browse the repository at this point in the history
  • Loading branch information
vasilakisfil committed Mar 6, 2015
1 parent bad6538 commit 88c18ad
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/middleman_prismic.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require 'prismic'
require 'middleman_prismic/version'
require 'middleman_prismic/commands/prismic'

Expand Down
3 changes: 3 additions & 0 deletions lib/middleman_prismic/commands/prismic.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require 'yaml'
require 'fileutils'

module Middleman
module Cli
Expand Down Expand Up @@ -31,6 +32,8 @@ def prismic
::Middleman::Application.server.inst
reference = MiddlemanPrismic.options.release

Dir.mkdir('data') unless File.exists?('data')

FileUtils.rm_rf(Dir.glob('data/prismic_*'))

api = ::Prismic.api(MiddlemanPrismic.options.api_url)
Expand Down
2 changes: 1 addition & 1 deletion lib/middleman_prismic/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module MiddlemanPrismic
VERSION = "0.1.0"
VERSION = "0.1.1"
end
1 change: 1 addition & 0 deletions middleman_prismic.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Gem::Specification.new do |spec|

spec.add_dependency "middleman", "~> 3.3"
spec.add_dependency "middleman-core", "~> 3.3"
spec.add_dependency "prismic.io", "~> 1.1"

spec.add_development_dependency "bundler", "~> 1.8"
spec.add_development_dependency "rake", "~> 10.0"
Expand Down

0 comments on commit 88c18ad

Please sign in to comment.