writeFileMapping :: FilePath -> IO ()
writeFileMapping fp = do
  stmts <- getCore fp >>= getJs
  (text,mappings) <- getTextMappings (T.pack name) stmts
  T.writeFile (name ++ ".js") text
  L.writeFile (name ++ mapExt) (Aeson.encode (getMappingsJson name mappings))

  where name = reverse . dropWhile (=='.') . dropWhile (/='.') . reverse $ fp
writeFileMapping :: FilePath -> IO ()
writeFileMapping fp = do
  stmts <- getCore fp >>= getJs
  (text,mappings) <- getTextMappings (T.pack name) stmts
  T.writeFile (name ++ ".js") text
  L.writeFile (name ++ mapExt) (Aeson.encode (getMappingsJson name mappings))

  where name = reverse . dropWhile (=='.') . dropWhile (/='.') . reverse $ fp
writeFileMapping fp = do
  stmts <- getCore fp >>= getJs
  (text,mappings) <- getTextMappings (T.pack name) stmts
  T.writeFile (name ++ ".js") text
  L.writeFile (name ++ mapExt) (Aeson.encode (getMappingsJson name mappings))

  where name = reverse . dropWhile (=='.') . dropWhile (/='.') . reverse $ fp