From a1bdb3fc52d7c3cbe9b8a8b0ac2d20b2aa032a92 Mon Sep 17 00:00:00 2001 From: Alexander Taylor Date: Fri, 8 Dec 2023 21:55:16 +0000 Subject: [PATCH] Improve development instructions in README and add script to run app locally with "npm serve" --- README.md | 15 +++++++++++---- package.json | 3 ++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9296df1..6373e2c 100644 --- a/README.md +++ b/README.md @@ -11,17 +11,22 @@ Open to additions and pull requests. ## Installation -### Install Node.js and Jekyll +### Install Node and Ruby dependencies -Before using avatar-framer, you must ensure that Node.js and Jekyll are installed on your system. To install, do the following: +Before using avatar-framer, you must install its dependencies by doing the +following: -1. Install [Node.js](https://nodejs.org) and npm. + +1. Install [Node.js and NPM](https://www.google.com/search?q=installing+NPM). -2. Install [Jekyll](https://jekyllrb.com/docs/installation) +2. Install [Ruby](https://www.ruby-lang.org/en/downloads/) and [Bundler](https://bundler.io/). 3. Install dependancies: + ``` npm install +bundle install ``` ### Usage - Generate your site @@ -39,6 +44,8 @@ jekyll build npm run build ``` +5. Preview the site using `npm run serve` and going to http://localhost:8080 + ### Image requirements #### Frames * Frames should be `2000px x 2000px` for maximum resolution. diff --git a/package.json b/package.json index 8b58547..9ea48b8 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,8 @@ "build": "bundle exec jekyll build && npm run js && npm run css && npm run prod-css && npm run min", "build-docs": "npm run build && rsync -av * docs/ --exclude docs --exclude index.html --exclude _config.yml --exclude README.md", "watch:css": "postcss src/css/styles.css -o dist/css/styles.css --watch", - "dev": "concurrently --kill-others-on-fail --names \"JS,JEKYLL,CSS\" --prefix-colors \"bgBlue.bold,bgGreen.bold,bgMagenta.bold\" \"npm run js\" \"sleep 5 && bundle exec jekyll serve --livereload --livereload-min-delay 2\" \"npm run watch:css\"" + "dev": "concurrently --kill-others-on-fail --names \"JS,JEKYLL,CSS\" --prefix-colors \"bgBlue.bold,bgGreen.bold,bgMagenta.bold\" \"npm run js\" \"sleep 5 && bundle exec jekyll serve --livereload --livereload-min-delay 2\" \"npm run watch:css\"", + "serve": "cd _site && http-server -c-1" }, "keywords": [], "author": "Andrew Quinn",