feat: npm release support (#88)

This commit is contained in:
Adam Uhlíř
2021-04-29 13:43:07 +02:00
committed by GitHub
parent d3da895f03
commit 0fb73f85b4
4 changed files with 259 additions and 1304 deletions
+9 -7
View File
@@ -24,24 +24,26 @@
- [Contribute](#contribute) - [Contribute](#contribute)
- [License](#license) - [License](#license)
## Install & build ## Install
``` ```
$ npm install -g @ethersphere/bee-dashboard
$ bee-dashboard
```
## Development
```sh
git clone git@github.com:ethersphere/bee-dashboard.git git clone git@github.com:ethersphere/bee-dashboard.git
cd bee-dashboard cd bee-dashboard
npm ci npm ci
npm run build npm run build
```
## Serve the Bee Dashboard website
```sh
npm run serve npm run serve
``` ```
You can now access Bee Dashboard on [http://localhost:5000/](http://localhost:5000/) You can now access Bee Dashboard on [http://localhost:8080/](http://localhost:8080/)
## Contribute ## Contribute
+226 -1294
View File
File diff suppressed because it is too large Load Diff
+8 -3
View File
@@ -1,5 +1,5 @@
{ {
"name": "bee-dashboard", "name": "@ethersphere/bee-dashboard",
"version": "0.1.0", "version": "0.1.0",
"description": "An app which helps users to setup their Bee node and do actions like cash out cheques", "description": "An app which helps users to setup their Bee node and do actions like cash out cheques",
"keywords": [ "keywords": [
@@ -12,6 +12,9 @@
"p2p" "p2p"
], ],
"homepage": ".", "homepage": ".",
"bin": {
"bee-dashboard": "./serve.js"
},
"bugs": { "bugs": {
"url": "https://github.com/ethersphere/bee-dashboard/issues/" "url": "https://github.com/ethersphere/bee-dashboard/issues/"
}, },
@@ -30,6 +33,7 @@
"axios": "^0.21.1", "axios": "^0.21.1",
"bignumber.js": "^9.0.1", "bignumber.js": "^9.0.1",
"feather-icons": "^4.28.0", "feather-icons": "^4.28.0",
"http-serve": "^1.0.1",
"material-ui-dropzone": "^3.5.0", "material-ui-dropzone": "^3.5.0",
"qrcode.react": "^1.0.1", "qrcode.react": "^1.0.1",
"react": "^17.0.2", "react": "^17.0.2",
@@ -58,18 +62,19 @@
"eslint-plugin-react": "^7.23.2", "eslint-plugin-react": "^7.23.2",
"prettier": "^2.2.1", "prettier": "^2.2.1",
"react-scripts": "4.0.3", "react-scripts": "4.0.3",
"serve": "^11.3.2",
"typescript": "^4.2.4", "typescript": "^4.2.4",
"web-vitals": "^1.1.1" "web-vitals": "^1.1.1"
}, },
"scripts": { "scripts": {
"prepare": "npm run build",
"start": "react-scripts start", "start": "react-scripts start",
"build": "react-scripts build", "build": "react-scripts build",
"test": "react-scripts test", "test": "react-scripts test",
"serve": "serve -s ./build", "serve": "http-serve -o ./build",
"lint": "eslint --fix \"src/**/*.ts\" \"src/**/*.tsx\" && prettier --write \"src/**/*.ts\" \"src/**/*.tsx\"", "lint": "eslint --fix \"src/**/*.ts\" \"src/**/*.tsx\" && prettier --write \"src/**/*.ts\" \"src/**/*.tsx\"",
"lint:check": "eslint \"src/**/*.ts\" \"src/**/*.tsx\" && prettier --check \"src/**/*.ts\" \"src/**/*.tsx\"" "lint:check": "eslint \"src/**/*.ts\" \"src/**/*.tsx\" && prettier --check \"src/**/*.ts\" \"src/**/*.tsx\""
}, },
"files": ["build", "serve.js"],
"eslintConfig": { "eslintConfig": {
"extends": [ "extends": [
"react-app", "react-app",
Executable
+16
View File
@@ -0,0 +1,16 @@
#!/usr/bin/env node
const path = require('path')
const serve = require('http-serve')
const opener = require('opener')
const server = serve.createServer({
root: path.join(__dirname, 'build')
})
server.listen(8080, '127.0.0.1', function () {
console.log('Starting up Bee Dashboard on address http://localhost:8080')
console.log('Hit CTRL-C to stop the server')
opener('http://localhost:8080')
})