-
Notifications
You must be signed in to change notification settings - Fork 0
/
project.clj
125 lines (113 loc) · 5.16 KB
/
project.clj
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
(def use-advanced-optimizations? true)
(def compiler-option-common
{:output-to "resources/public/cljs/cl.js"
:language-in :ecmascript5
:language-out :ecmascript5
:optimizations (if use-advanced-optimizations? :advanced :simple)
:pretty-print false})
(def compiler-option-js
(merge compiler-option-common
{:main 'vnctst.audio4.js
:output-dir "target/out-js" ; unused
:output-to "for-npm/vnctst-audio4.js"}))
(def compiler-option-prod
(merge compiler-option-common
{:main 'vnctst.audio4.demo
:output-dir "target/out-prod" ; unused
}))
(def compiler-option-dev
(merge compiler-option-common
{:main 'vnctst.audio4.demo-dev
:output-dir "resources/public/cljs/out"
:asset-path "cljs/out"
:optimizations :none
:source-map true
:source-map-timestamp true
:cache-analysis true
:pretty-print true
}))
(def figwheel-version "0.5.14")
(def plugins-cljs-prod '[[lein-cljsbuild "1.1.7"]])
(def plugins-cljs-dev (vec (concat plugins-cljs-prod
[['lein-figwheel figwheel-version :exclusions '[org.clojure/clojure]]])))
(def dependencies-cljs-prod
'[[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.9.946"]
])
(def dependencies-cljs-dev
(vec (concat dependencies-cljs-prod
[['figwheel figwheel-version]])))
(defproject jp.ne.tir/vnctst-audio4 "0.3.3-SNAPSHOT"
:min-lein-version "2.5.0"
:description "Audio playback library for html5 game"
:url "https://github.com/ayamada/vnctst-audio4"
:license {:name "Zlib License"
:url "https://opensource.org/licenses/Zlib"}
:dependencies [[org.clojure/core.async "0.3.443"
:exclusions [org.clojure/clojure]]
[jp.ne.tir/project-clj "0.1.7"
:exclusions [org.clojure/clojure
org.codehaus.plexus/plexus-utils
org.apache.maven.wagon/wagon-provider-api
org.clojure/tools.macro]]
[org.apache.maven.wagon/wagon-provider-api "3.0.0"]
]
:source-paths ["src/cljs"]
:clean-targets ^{:protect false} [:target-path
:compile-path
"resources/public/cljs"
"figwheel_server.log"]
;; NB: リリース時には resources/ 配下は明示的に含めないようにする
;; (開発時に使うものを入れており、リリース時には全く不要な為)
:resource-paths []
:jar-exclusions []
;; 基本的に、以下の場合分けになる
;; - 開発用(サンプルデモ使用)
;; - ringサーバ起動
;; - lein with-profile ring ring server-headless
;; - figwheelサーバ起動
;; - rlwrap lein with-profile +demo-dev figwheel demo-dev
;; - リリース用
;; - clojars登録用(profileなし状態)
;; - lein deploy clojars
;; - vnctst-audio4.js のリリース版ビルド(ビルド後にコミットする想定)
;; - lein clean && lein with-profile for-js cljsbuild once for-js
;; - サンプルデモのリリースビルド
;; - lein clean && lein with-profile demo-prod cljsbuild once demo-prod
:profiles {:ring {:source-paths ["src/ring"]
:dependencies [[org.clojure/clojure "1.8.0"]
[ring/ring-core "1.6.3"]
[hiccup "1.0.5"]]
:resource-paths ["resources"]
:plugins [[lein-ring "0.12.1"]]
:ring {:port 8004
:handler vnctst.audio4.demo.server/handler}}
:for-js {:dependencies ~dependencies-cljs-prod
:plugins ~plugins-cljs-prod}
:demo-dev {:dependencies ~dependencies-cljs-dev
:plugins ~plugins-cljs-dev
:resource-paths ["resources"]}
:demo-prod {:dependencies ~dependencies-cljs-prod
:plugins ~plugins-cljs-prod
:resource-paths ["resources"]}}
:cljsbuild {:builds {:for-js {:compiler ~compiler-option-js
:source-paths ["src/cljs" "src/for-js"]
:jar true}
:demo-dev {:compiler ~compiler-option-dev
:source-paths ["src/cljs"
"src/for-js"
"src/demo"
"src/demo-dev"]
:jar false}
:demo-prod {:compiler ~compiler-option-prod
:source-paths ["src/cljs"
"src/for-js"
"src/demo"]
:jar true}
}}
:figwheel {:http-server-root "public"
:server-ip "0.0.0.0"
:server-port 9004
:server-logfile "figwheel_server.log"}
:pedantic? :abort
)