File tree Expand file tree Collapse file tree 7 files changed +18
-2
lines changed Expand file tree Collapse file tree 7 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,11 @@ See the ClojureScript [testing page](https://clojurescript.org/tools/testing) fo
112112Builds the app for production to the ` public ` folder.<br >
113113It correctly bundles all code and optimizes the build for the best performance.
114114
115+ ### ` npm run server ` or ` yarn server `
116+
117+ Starts a Shadow CLJS background server.<br >
118+ This will speed up starting time for other commands that use Shadow CLJS.
119+
115120## License
116121
117122Create CLJS App is open source software [ licensed as MIT] ( https://github.com/filipesilva/create-cljs-app/blob/master/LICENSE ) .
Original file line number Diff line number Diff line change 1111 },
1212 "scripts" : {
1313 "sc" : " shadow-cljs" ,
14+ "server" : " shadow-cljs stop && shadow-cljs start" ,
1415 "start" : " shadow-cljs watch lib" ,
1516 "build" : " yarn clean && shadow-cljs release lib" ,
1617 "test" : " shadow-cljs watch test --config-merge \" {:autorun true}\" " ,
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ Will likely need to be replaced with a proper templating library."
2020 " public/index.html" [{:from " __NAME__" :to name}]
2121 " src/app/core.cljs" [{:from " __NAME__" :to name}]
2222 " README.md" [{:from " __START__" :to (:start commands)}
23+ {:from " __SERVER__" :to (:server commands)}
2324 {:from " __TEST__" :to (:test commands)}
2425 {:from " __TEST:ONCE__" :to (:test:once commands)}
2526 {:from " __E2E__" :to (:e2e commands)}
@@ -68,8 +69,8 @@ Will likely need to be replaced with a proper templating library."
6869
6970(defn copy-files
7071 " Copy files from one directory to another, preserving folder structure."
71- [files from to get- template-values-map]
72- (doall (map #(copy-file from to % (get get- template-values-map %)) files)))
72+ [files from to template-values-map]
73+ (doall (map #(copy-file from to % (get template-values-map %)) files)))
7374
7475(defn use-template
7576 " Create an app from a template into."
Original file line number Diff line number Diff line change 1313 [use-yarn]
1414 (if use-yarn
1515 {:start " yarn start"
16+ :server " yarn server"
1617 :build " yarn build"
1718 :test " yarn test"
1819 :test:once " yarn test:once"
1920 :e2e " yarn e2e"
2021 :lint " yarn lint"
2122 :format " yarn format" }
2223 {:start " npm start"
24+ :server " npm run server"
2325 :build " npm run build"
2426 :test " npm test"
2527 :test:once " npm run test:once"
Original file line number Diff line number Diff line change 3939 (is (not (fileIncludes " ./public/index.html" " __NAME__" )))
4040 (is (not (fileIncludes " ./src/app/core.cljs" " __NAME__" )))
4141 (is (not (fileIncludes " ./README.md" " __START__" )))
42+ (is (not (fileIncludes " ./README.md" " __SERVER__" )))
4243 (is (not (fileIncludes " ./README.md" " __TEST__" )))
4344 (is (not (fileIncludes " ./README.md" " __TEST:ONCE__" )))
4445 (is (not (fileIncludes " ./README.md" " __E2E__" )))
Original file line number Diff line number Diff line change @@ -36,6 +36,11 @@ It correctly bundles all code and optimizes the build for the best performance.
3636
3737Your app is ready to be deployed!
3838
39+ ### ` __SERVER__ `
40+
41+ Starts a Shadow CLJS background server.<br >
42+ This will speed up starting time for other commands that use Shadow CLJS.
43+
3944## Useful resources
4045
4146Clojurians Slack http://clojurians.net/ .
Original file line number Diff line number Diff line change 44 "private" : true ,
55 "scripts" : {
66 "sc" : " shadow-cljs" ,
7+ "server" : " shadow-cljs stop && shadow-cljs start" ,
78 "start" : " shadow-cljs watch app" ,
89 "build" : " yarn clean && shadow-cljs release app" ,
910 "test" : " shadow-cljs watch test --config-merge \" {:autorun true}\" " ,
You can’t perform that action at this time.
0 commit comments