               [next-el-loc deconstruction] (if script
                                              (let [script-name (str (mf/safe-name script-name) ".js")]
                                                [(cz/next (script-node->fileref script script-name))
-                                                (conj deconstruction [(str base-path File/separator script-name) (loc-text script)])])
+                                                (conj deconstruction [(str base-path script-name) (loc-text script)])])
                                              [(cz/next el-loc) deconstruction])]
 
           (recur next-el-loc deconstruction))))))

(defn deconstruct-node
  "Takes an xml node representing one of our major api elements and returns one or
  more deconstructed parts with filenames and a zip loc for the content."
  [file-path el-loc find-name-val]
  (let [base-path (mf/remove-extension file-path)]
    (loop [el-loc el-loc
           deconstruction []]
      ;; (log/info (str "tag: " (:tag (cz/node el-loc))))

     (some (fn [[name script]]
             (when-let [script-loc (script el-loc)]
               [(name script-loc) script-loc]))
           channel-deconstructors))
   true))

(comment

