     [cljs-api-gen.write :refer [get-last-written-result]]
     [cljs-api-gen.encode :refer [decode-fullname]]
     [clojure.java.jdbc :as j]
-    [me.raynes.fs :refer [copy copy-dir list-dir base-name mkdirs]]
+    [me.raynes.fs :refer [delete-dir copy copy-dir list-dir base-name mkdirs]]
     ))
 
 ;; NOTE: you have to run docset/run-all.sh first to download/process the

                    (-> result :compiler-api :symbols))
        namespaces (set (map :ns (vals syms)))]

    (mkdirs docset-docs-path)

    ;; copy over offline pages

       "CREATE TABLE searchIndex(id INTEGER PRIMARY KEY, name TEXT, type TEXT, path TEXT)"
       "CREATE UNIQUE INDEX anchor ON searchIndex (name, type, path)")

    (j/insert! sqlite-db :searchIndex
       ;; insert categories
       {:name "Library API"  :type "Category" :path (resolve-path "README.html#library-api-reference")}
       {:name "Compiler API" :type "Category" :path (resolve-path "README.html#compiler-api-reference")}

       ;; insert sections
       {:name "Overview"                :type "Section" :path (resolve-path "README.html")}
       {:name "History"                 :type "Section" :path (resolve-path "HISTORY.html")}
       {:name "Not Ported From Clojure" :type "Section" :path (resolve-path "UNPORTED.html")}
       )

    ;; insert namespaces
    (apply j/insert! sqlite-db :searchIndex
