Sha256: 677b7ca708541b6680c7ccfcfacff57a245d4a5b9993b2f0b43c864ef6a9c20e
Contents?: true
Size: 590 Bytes
Versions: 2
Compression:
Stored size: 590 Bytes
Contents
# usage rake isolate[my-post] desc "Move all other posts than the one currently being worked on to a temporary stash location (stash) so regenerating the site happens much more quickly." task :isolate, :filename do |t, args| if args.filename filename = args.filename else filename = get_stdin("Enter a post file name: ") end FileUtils.mkdir(full_stash_dir) unless File.exist?(full_stash_dir) Dir.glob("#{Octopress.configuration[:source]}/#{Octopress.configuration[:posts_dir]}/*.*") do |post| FileUtils.mv post, full_stash_dir unless post.include?(filename) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
octopress-3.0.0.alpha2 | lib/rake/isolate.rake |
octopress-3.0.0.alpha1 | lib/rake/isolate.rake |