Safe Haskell | None |
---|
- treeExtAny :: WatchManager -> FilePath -> Text -> (FilePath -> IO ()) -> IO ()
- treeExtExists :: WatchManager -> FilePath -> Text -> (FilePath -> IO ()) -> IO ()
- doAllEvents :: Monad m => (FilePath -> m ()) -> Event -> m ()
- allEvents :: (FilePath -> Bool) -> Event -> Bool
- existsEvents :: (FilePath -> Bool) -> Event -> Bool
Documentation
:: WatchManager | |
-> FilePath | Directory to watch |
-> Text | extension |
-> (FilePath -> IO ()) | action to run on file |
-> IO () |
In the given directory tree, for files with the given file extension perform the given action
:: WatchManager | |
-> FilePath | Directory to watch |
-> Text | extension |
-> (FilePath -> IO ()) | action to run on file |
-> IO () |
Example of compiling scss files with compass
compass :: WatchManager -> FilePath -> IO ()
compass man dir = do
putStrLn $ compass ++ encodeString dir
treeExtExists man dir scss $ fp ->
when (deploy
notElem
splitDirectories fp) $ do
let d = encodeString $ head (splitDirectories rel)
system cd ++ d ++ && bundle exec compass compile
return ()
In the given directory tree, watch for any Added and Modified events (but ignore Removed events) for files with the given file extension perform the given action
doAllEvents :: Monad m => (FilePath -> m ()) -> Event -> m ()Source