public
Description: A minimum web dev DSL in Haskell
Homepage:
Clone URL: git://github.com/nfjinjing/loli.git
loli / Nemesis
100644 60 lines (43 sloc) 1.162 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import Prelude hiding ((.), (-))
import MPS.Light
 
nemesis = do
  
  clean
    [ "**/*.hi"
    , "**/*.o"
    , "manifest"
    , "Test"
    , "myloli"
    , "pure_hack"
    ]
    
  desc "prepare cabal dist"
  task "dist" - do
    sh "cabal clean"
    sh "cabal configure"
    sh "cabal sdist"
 
  desc "put all .hs files in manifest"
  task "manifest" - do
    sh "find . | grep 'hs-' > manifest"
 
 
 
  desc "show sloc"
  task "stat" - do
    sh "cloc -match-f=hs- --quiet src --no3"
    
 
  ghci "template" "Network/Loli/Template"
  ghci "ipaste" "Test/LoliPaste"
  ghci "i" "Test/Test"
  
  bin "test" "Test/Test"
  bin "paste" "Test/LoliPaste"
  bin "myapp" "Test/myapp"
  bin "debug" "Debug/Debug"
  
  
  -- test
  
  task "tl" - sh "curl j:3000"
  task "tp" - sh "curl -d 'src=print' j:3000"
 
  -- deploy
  task "deploy" - sh "scp -C .bin/paste easymic.com:~/link/loli/.bin"
 
  task "start" - do
    sh "echo starting.."
    sh ".bin/paste"
  
  where
    ghci n x = task n - sh - "ghci -isrc src/" ++ x ++ ".hs"
    bin n x = task n - do
      sh - "ghc --make -Wall -isrc src/" ++ x ++ ".hs -o .bin/" ++ n
      sh - "echo done.."
      sh - ".bin/" ++ n