Browse code
(init)
Ed Langley authored on 22/07/2020 21:31:42
Showing 6 changed files
Showing 6 changed files
0 | 6 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,42 @@ |
1 |
+# hoplon-try-again |
|
2 |
+ |
|
3 |
+A [Hoplon][3] project designed to...well, that part is up to you. |
|
4 |
+ |
|
5 |
+## Dependencies |
|
6 |
+ |
|
7 |
+- java 1.7+ |
|
8 |
+- [boot][1] |
|
9 |
+ |
|
10 |
+## Usage |
|
11 |
+### Development |
|
12 |
+1. Start the `dev` task. In a terminal run: |
|
13 |
+ ```bash |
|
14 |
+ $ boot dev |
|
15 |
+ ``` |
|
16 |
+ This will give you a Hoplon development setup with: |
|
17 |
+ - auto compilation on file changes |
|
18 |
+ - audible warning for compilation success or failures |
|
19 |
+ - auto reload the html page on changes |
|
20 |
+ - Clojurescript REPL |
|
21 |
+ |
|
22 |
+2. Go to [http://localhost:8000][2] in your browser. You should see "Hello, Hoplon!". |
|
23 |
+ |
|
24 |
+3. If you edit and save a file, the task will recompile the code and reload the |
|
25 |
+ browser to show the updated version. |
|
26 |
+ |
|
27 |
+### Production |
|
28 |
+1. Run the `prod` task. In a terminal run: |
|
29 |
+ ```bash |
|
30 |
+ $ boot prod |
|
31 |
+ ``` |
|
32 |
+ |
|
33 |
+2. The compiled files will be on the `target/` directory. This will use |
|
34 |
+ advanced compilation and prerender the html. |
|
35 |
+ |
|
36 |
+## License |
|
37 |
+ |
|
38 |
+Copyright © 2020, **Your Name Goes Here** |
|
39 |
+ |
|
40 |
+[1]: http://boot-clj.com |
|
41 |
+[2]: http://localhost:8000 |
|
42 |
+[3]: http://hoplon.io |
0 | 4 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,35 @@ |
1 |
+(set-env! |
|
2 |
+ :dependencies '[[adzerk/boot-cljs "2.1.5"] |
|
3 |
+ [adzerk/boot-reload "0.6.0"] |
|
4 |
+ [hoplon/hoplon "7.2.0"] |
|
5 |
+ [org.clojure/clojure "1.10.1"] |
|
6 |
+ [org.clojure/clojurescript "1.10.773"] |
|
7 |
+ [tailrecursion/boot-jetty "0.1.3"] |
|
8 |
+ [jakarta.xml.bind/jakarta.xml.bind-api "2.3.3"]] |
|
9 |
+ :source-paths #{"src"} |
|
10 |
+ :asset-paths #{"assets"}) |
|
11 |
+ |
|
12 |
+(require |
|
13 |
+ '[adzerk.boot-cljs :refer [cljs]] |
|
14 |
+ '[adzerk.boot-reload :refer [reload]] |
|
15 |
+ '[hoplon.boot-hoplon :refer [hoplon prerender]] |
|
16 |
+ '[tailrecursion.boot-jetty :refer [serve]]) |
|
17 |
+ |
|
18 |
+(deftask dev |
|
19 |
+ "Build hoplon-try-again for local development." |
|
20 |
+ [] |
|
21 |
+ (comp |
|
22 |
+ (watch) |
|
23 |
+ (speak) |
|
24 |
+ (hoplon) |
|
25 |
+ (reload) |
|
26 |
+ (cljs) |
|
27 |
+ (serve :port 8000))) |
|
28 |
+ |
|
29 |
+(deftask prod |
|
30 |
+ "Build hoplon-try-again for production deployment." |
|
31 |
+ [] |
|
32 |
+ (comp |
|
33 |
+ (hoplon) |
|
34 |
+ (cljs :optimizations :advanced) |
|
35 |
+ (target :dir #{"target"}))) |