1
1
mirror of https://github.com/github/semantic.git synced 2024-12-27 08:54:14 +03:00

Parse js files too

This commit is contained in:
joshvera 2017-10-17 15:03:29 -04:00
parent 6cecc8d3de
commit 3b551f5741

View File

@ -55,7 +55,7 @@ readBlobsFromHandle = fmap toBlobs . readFromHandle
readBlobsFromDir :: MonadIO m => FilePath -> m [Blob.Blob]
readBlobsFromDir path = do
paths <- liftIO (glob (path </> "**/*.rb"))
paths <- liftIO (globDir1 (compile "[^vendor]**/*[.rb|.js]") path)
let paths' = catMaybes $ fmap (\p -> (p,) . Just <$> languageForFilePath p) paths
traverse (uncurry readFile) paths'