* Edits on package.json #45

Add prepublishOnly https://docs.npmjs.com/misc/scripts
Add bin https://docs.npmjs.com/files/package.json#bin

* `chmod +x src/index.js`

This is required because file is run from package.json:7 bin

* Add npm install documentation #45

* Add npm badge

* Styling change by npm in package.json

* Add warning on npm global install

https://github.com/jeremija/peer-calls/pull/48#issuecomment-437192240
This commit is contained in:
Lucian I. Last 2018-11-13 22:27:56 +01:00 committed by Jerko Steiner
parent 589f1091b7
commit db0c6a24ce
3 changed files with 18 additions and 2 deletions

View File

@ -1,6 +1,6 @@
# Peer Calls
[![Build Status](https://travis-ci.org/jeremija/peer-calls.svg?branch=master)](https://travis-ci.org/jeremija/peer-calls)
[![Build Status](https://travis-ci.org/jeremija/peer-calls.svg?branch=master)](https://travis-ci.org/jeremija/peer-calls) [![npm](https://img.shields.io/npm/v/peer-calls.svg)](https://www.npmjs.com/package/peer-calls)
WebRTC peer to peer calls for everyone. See it live in action at
[peercalls.com](https://peercalls.com).
@ -12,7 +12,19 @@ Work in progress.
# Installation & Running
From git source:
## From npm
create directory `./peer-calls` and copy [config/default.json](https://raw.githubusercontent.com/jeremija/peer-calls/master/config/default.json) into it.
```bash
npm install --global peer-calls
env NODE_CONFIG_DIR=./peer-calls peercalls
```
> :warning: Using `--global` is not advised in server environments. [*](https://github.com/jeremija/peer-calls/pull/48)
## From git source
```bash
git clone https://github.com/jeremija/peer-calls.git

View File

@ -4,11 +4,15 @@
"description": "Group peer to peer video calls for anybody.",
"repository": "https://github.com/jeremija/peer-calls",
"main": "src/index.js",
"bin": {
"peercalls": "./src/index.js"
},
"scripts": {
"start": "node src/index.js",
"start:server": "nodemon src/index.js --ignore build/ --ignore src/client",
"start:watch": "chastifol [ npm run js:watch ] [ npm run css:watch ] [ npm run start:server ]",
"watch": "",
"prepublishOnly": "npm run build",
"build": "npm run css && npm run js",
"test": "jest",
"test:coverage": "jest --coverage",

0
src/index.js Normal file → Executable file
View File