package.json file removed and replaced by bunch of lein aliases

Instead of using package.json which caused `lein deps` to fail. I
replaced it with several lein aliases which serve the same purpose.
For example `docs-build` builds the HTML version of docs in `./build/`
and `docs-serve` run a development server for docs on port `4000`.
For more information take a look at `project.clj`. NOTE: in order
to use the docs build system you need to install gitbook-cli utility.
This commit is contained in:
Sameer Rahmani 2017-09-26 14:52:13 +01:00
parent 668cfe845e
commit 2dcdafe725
2 changed files with 21 additions and 19 deletions

View File

@ -1,18 +0,0 @@
{
"name": "re-frame-docs",
"version": "1.0.0",
"main": "index.js",
"repository": "https://github.com/Day8/re-frame.git",
"scripts": {
"serve": "mkdir -p ./build/_book && gitbook serve ./ ./build/re-frame",
"epub": "gitbook epub ./ ./build/re-frame.epub",
"mobi": "gitbook mobi ./ ./build/re-frame.mobi",
"pdf": "gitbook pdf ./ ./build/re-frame.pdf",
"html": "gitbook build ./ ./build/re-frame",
"build": "npm run html && npm run pdf && npm run mobi && npm run epub"
},
"dependencies": {
"gitbook-cli": "^2.3.2",
"svgexport": "^0.3.2"
}
}

View File

@ -68,4 +68,24 @@
:aliases {"test-once" ["do" "clean," "cljsbuild" "once" "test," "shell" "open" "test/test.html"]
"test-auto" ["do" "clean," "cljsbuild" "auto" "test,"]
"karma-once" ["do" "clean," "cljsbuild" "once" "karma,"]
"karma-auto" ["do" "clean," "cljsbuild" "auto" "karma,"]})
"karma-auto" ["do" "clean," "cljsbuild" "auto" "karma,"]
;; NOTE: In order to compile docs you would need to install
;; gitbook-cli(2.3.2) utility globaly using npm or yarn
"docs-serve" ^{:doc "Runs the development server of docs with live reloading"} ["shell" "gitbook" "serve" "./" "./build/re-frame/"]
"docs-build" ^{:doc "Builds the HTML version of docs"} ["shell" "gitbook" "build" "./" "./build/re-frame/"]
;; NOTE: Calibre and svgexport(0.3.2) are needed to build below
;; formats of docs. Install svgexpor3t using npm or yarn.
"docs-pdf" ^{:doc "Builds the PDF version of docs"}
["do"
["shell" "mkdir" "-p" "./build/"]
["shell" "gitbook" "pdf" "./" "./build/re-frame.pdf"]]
"docs-mobi" ^{:doc "Builds the MOBI version of docs"}
["do"
["shell" "mkdir" "-p" "./build/"]
["shell" "gitbook" "mobi" "./" "./build/re-frame.mobi"]]
"docs-epub" ^{:doc "Builds the EPUB version of docs"}
["do"
["shell" "mkdir" "-p" "./build/"]
["shell" "gitbook" "epub" "./" "./build/re-frame.epub"]]})