Skip to content

Commit 2b628d1

Browse files
committed
Use Cabal as the build system instead of bash scripts
1 parent a6c6c7c commit 2b628d1

File tree

6 files changed

+66
-35
lines changed

6 files changed

+66
-35
lines changed

ElmLang.cabal

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: ElmLang
2+
version: 0.1.0.0
3+
synopsis: elm-lang.org web site
4+
description: Server and content for the Elm Language web site.
5+
homepage: http://elm-lang.org/
6+
license: BSD3
7+
license-file: LICENSE
8+
author: Evan Czaplicki
9+
maintainer: [email protected]
10+
copyright: (c) 2012-2013 Evan Czaplicki
11+
12+
build-type: Simple
13+
extra-source-files: README.md
14+
cabal-version: >=1.10
15+
16+
extra-tmp-files: public/build
17+
, public/cache
18+
19+
executable ElmServer
20+
main-is: Server.hs
21+
other-extensions: OverloadedStrings
22+
ghc-options: -threaded -O2
23+
build-depends: base >=4.6 && <4.7
24+
, containers >=0.5 && <0.6
25+
, bytestring >=0.10 && <0.11
26+
, aeson >=0.6 && <0.7
27+
, filepath >=1.3 && <1.4
28+
, directory >=1.2 && <1.3
29+
, parsec >=3.1 && <3.2
30+
, blaze-html >=0.6 && <0.7
31+
, HTTP >=4000.2 && <4000.3
32+
, blaze-markup >=0.5 && <0.6
33+
, Elm >=0.9 && <0.10
34+
, happstack-server >=7.3 && <7.4
35+
, mtl >=2.1 && <2.2
36+
, process >=1.1 && <1.2
37+
38+
hs-source-dirs: server
39+
default-language: Haskell2010

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c)2012, Evan Czaplicki
1+
Copyright (c) 2012-2013 Evan Czaplicki
22

33
All rights reserved.
44

README.md

+24-24
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# elm-lang.org: a template for creating websites in Elm
22

3-
This project contains all of the source files used to create [elm-lang.org](http://elm-lang.org/),
4-
the home-page of the Elm programming language.
3+
This project contains all of the source files used to create
4+
[elm-lang.org](http://elm-lang.org/), the home-page of the Elm programming
5+
language.
56

6-
The project provides a general structure for creating your own Elm website, mixing Elm, images,
7-
videos, HTML/CSS/JS, and whatever else you need.
7+
The project provides a general structure for creating your own Elm website,
8+
mixing Elm, images, videos, HTML/CSS/JS, and whatever else you need.
89

9-
This project includes a Haskell server that determines how to serve each kind of file, so you
10-
only need to think about the content.
10+
This project includes a Haskell server that determines how to serve each kind of
11+
file, so you only need to think about the content.
1112

1213
### Set up
1314

@@ -16,27 +17,26 @@ First make sure that you have the Elm compiler installed
1617

1718
Then follow these steps to get this all running on your local machine:
1819

19-
###### Unix / Mac
20-
21-
- Fork this project.
22-
- Run `bash compile.sh`. This will compile the server.
20+
- Clone this project.
21+
- Run `cabal clean && cabal build && cabal install`. Note the `clean` step is
22+
often necessary if you previously compiled with a different version of the
23+
server due to stale compiled Elm files.
2324
- Run `./ElmServer` to start the server.
2425

25-
###### Windows
26-
27-
- Fork this project.
28-
- Run `compile.bat`. This will compile the server and start it on your machine.
29-
30-
Great! You should be set up with [elm-lang.org](http://elm-lang.org/) running at [localhost:8000/](http://localhost:8000/).
26+
Great! You should be set up with [elm-lang.org](http://elm-lang.org/) running at
27+
[localhost:8000/](http://localhost:8000/).
3128

3229
### Project Structure
3330

34-
- `public/` &mdash; all of the .elm files used for the site. This makes up the majority of client-side code.
35-
You can change/delete the existing files and add entirely new files. The changes, deletions, and additions will
36-
be served automatically.
37-
- `resources/` &mdash; the various resources needed for Elm. This is where you put all of your non-Elm content,
38-
like images, videos, JavaScript code, etc.
39-
- `server/` &mdash; the Haskell files responsible for serving everything from .elm files to images. Look here
40-
if you need to change how a particular resource is served or if you want to disable some of the sites
41-
features (such as the online editor).
31+
- `public/` &mdash; all of the .elm files used for the site. This makes up the
32+
majority of client-side code. You can change/delete the existing files and
33+
add entirely new files. The changes, deletions, and additions will be served
34+
automatically.
35+
36+
- `resources/` &mdash; the various resources needed for Elm. This is where you
37+
put all of your non-Elm content, like images, videos, JavaScript code, etc.
4238

39+
- `server/` &mdash; the Haskell files responsible for serving everything from
40+
.elm files to images. Look here if you need to change how a particular
41+
resource is served or if you want to disable some of the sites features (such
42+
as the online editor).

Setup.hs

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import Distribution.Simple
2+
main = defaultMain

compile.bat

-6
This file was deleted.

compile.sh

-4
This file was deleted.

0 commit comments

Comments
 (0)