paritytech / oo7-parity Goto Github PK
View Code? Open in Web Editor NEWBond API for use with Parity
License: Apache License 2.0
Bond API for use with Parity
License: Apache License 2.0
Sample code:
import {bonds, formatBlockNumber, formatBalance} from 'oo7-parity';
import React from 'react';
import {Rspan} from 'oo7-react';
export class Screenshot05 extends BaseScene {
render() {
return (
<div>
Current block author's balance is:
<Rspan style={{
fontWeight: 'bold'
}}>
{bonds
.balance(bonds.head.author)
.map(formatBalance)}
</Rspan>
</div>
);
}
}
When I try to install 007-parity with npm install --save oo7-parity
it got the following error message:
$ npm install --save oo7-parity
npm ERR! code ENOLOCAL
npm ERR! Could not install from "node_modules/oo7" as it does not contain a package.json file.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/schmidsi/.npm/_logs/2017-11-10T09_59_49_517Z-debug.log
That said, it worked when I first installed 007
: npm install oo7 --save
It seems to me that the error roots in this line in package.json:
https://github.com/paritytech/oo7-parity/blob/master/package.json#L33
I think this is the wrong method to list a peerDependency. Furthermore, I don't think it should be a peerDependency at all. As far as I understand, peerDependecies are mainly for avoiding double loading of the same package in the browser. A simple dependency would be sufficient here. Correct me if I'm wrong.
However, if someone sheds clarification on the intent, I'm happy to make a pull-request.
% npm i --save oo7-parity
npm ERR! code ENOLOCAL
npm ERR! Could not install from "node_modules/oo7" as it does not contain a package.json file.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/fangyi/.npm/_logs/2017-11-15T13_51_54_080Z-debug.log
[1] % npm i --save [email protected]
npm ERR! code ENOLOCAL
npm ERR! Could not install from "node_modules/oo7" as it does not contain a package.json file.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/fangyi/.npm/_logs/2017-11-15T13_52_01_101Z-debug.log
[1] % npm i --save [email protected]
npm ERR! code ENOLOCAL
npm ERR! Could not install from "node_modules/oo7" as it does not contain a package.json file.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/fangyi/.npm/_logs/2017-11-15T13_52_03_611Z-debug.log
[1] % npm i --save [email protected]
npm ERR! code ENOLOCAL
npm ERR! Could not install from "node_modules/oo7" as it does not contain a package.json file.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/fangyi/.npm/_logs/2017-11-15T13_52_07_661Z-debug.log
[1] % npm i --save [email protected]
npm ERR! code ENOLOCAL
npm ERR! Could not install from "node_modules/oo7" as it does not contain a package.json file.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/fangyi/.npm/_logs/2017-11-15T13_52_10_211Z-debug.log
[1] % npm i --save [email protected]
npm WARN saveError ENOENT: no such file or directory, open '/Users/fangyi/playground/oo7/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/Users/fangyi/playground/oo7/package.json'
npm WARN oo7 No description
npm WARN oo7 No repository field.
npm WARN oo7 No README data
npm WARN oo7 No license field.
+ [email protected]
added 10 packages in 1.9s
All releases after 0.6.9 are broken
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.