diff --git a/README.md b/README.md index fc2d4a6..07ae2ea 100644 --- a/README.md +++ b/README.md @@ -21,10 +21,10 @@ To build the project make sure you have Node.js (v6.0.0), npm and Java 8 install ``` # after cloning the project, first install all dependencies $ npm install -# start a continuous build with hot-code-reloading; first build takes a while. open http://localhost:8080 + +# start a continuous build with hot-code-reloading and continuous testing +# first build takes a while. open http://localhost:8080 $ npm run dev -# build and optimize the code once for production -$ npm run build ``` **Note:** In dev mode this project comes with re-frame-10x. You can hit `Ctrl + h` to display the overlay and have a time traveling debugger. @@ -36,17 +36,19 @@ This project uses [karma](https://karma-runner.github.io/) for tests. Make sure ``` # run tests once $ npm test -# run tests continuously, watching for changes -$ npm run test:watch ``` ## Build artifacts -Everything you need to serve the app can be found inside the `public` folder. -## Deploy to github +## Deployment ``` -# will build everything and publish everything in /public via gh-pages +# build and optimize the code once for production +$ npm run build + +# runs npm run build and publishes everything via gh-pages $ npm run deploy ``` + +All build artifacts will be output in `/public`. Don't change anything in there as changes will be overwritten. diff --git a/package.json b/package.json index f869bfa..c9dca08 100644 --- a/package.json +++ b/package.json @@ -4,21 +4,19 @@ "description": "Airsonic UI written with re-frame", "main": "index.js", "scripts": { - "test": "run-s test:compile-once test:run-once", - "test:compile-once": "shadow-cljs compile test", - "test:run-once": "karma start --single-run", - "test:compile-watch": "shadow-cljs watch test", - "test:run-watch": "karma start --reporters growl,progress --auto-watch", - "test:watch": "npm-run-all test:compile-once -p test:compile-watch test:run-watch", "build:cljs": "shadow-cljs release app", "build:html": "sed 's/\"\\/app\\//\".\\/app\\//g' src/html/index.html > public/index.html", "build:sass": "node-sass --output-style compressed src/sass/app.sass public/app/style.css", "build": "rm -r public/*; run-p build:*; ", "deploy": "npm run build && gh-pages -d public", - "dev:cljs": "shadow-cljs watch app", + "dev:cljs": "shadow-cljs watch app test", "dev:html": "sed 's/\"\\.\\/app\\//\"\\/app\\//g' src/html/index.html > public/index.html", "dev:sass": "npm run build:sass; node-sass -w src/sass/app.sass public/app/style.css", - "dev": "run-p dev:*" + "dev:test": "karma start --reporters growl,progress --auto-watch", + "dev": "npm-run-all test:compile -p dev:*", + "test": "run-s test:compile test:run", + "test:compile": "shadow-cljs compile test", + "test:run": "karma start --single-run" }, "author": "Arne Schlüter", "license": "ISC",