Skip to content

Commit 88b0d7b

Browse files
committed
A few doc updates
1 parent 5097e2f commit 88b0d7b

File tree

5 files changed

+36
-33
lines changed

5 files changed

+36
-33
lines changed

.soliumrc.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
"indentation": true,
1818
"whitespace": true,
1919
"deprecated-suicide": true,
20-
"pragma-on-top": true
20+
"pragma-on-top": true,
21+
"overflow-indentation": false,
22+
"semicolon-whitespace": true,
23+
"conditionals-whitespace": true,
24+
"function-whitespace": false,
25+
"comma-whitespace": true
2126
}
2227
}

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Style Guidelines
44

5+
We use [Solium](https://github.com/duaraghav8/Solium) to enforce Solidity coding conventions and [ESLint](https://eslint.org/) to enforce Javascript coding conventions.
56
Below are a few style guidelines to be used when contributing to the Livepeer Protocol.
67

78
#### Solidity

README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,23 @@ This is a work in progress LivepeerProtocol implementation. See the [Dev Roadmap
1717
To build and test the Livepeer Protocol locally:
1818

1919
```
20-
# Install and Launch TestRPC
21-
npm install -g ethereumjs-testrpc
22-
2320
# Clone the repo and install dependencies
2421
git clone https://github.com/livepeer/protocol.git
2522
cd protocol
2623
npm install
2724
2825
# Start testrpc
29-
testrpc
26+
npm run testrpc
3027
3128
# Run the tests in another console window
32-
truffle test
29+
npm run test
3330
```
3431

3532
Tests involving verification via Oraclize require [ethereum-bridge](https://github.com/oraclize/ethereum-bridge)
3633

3734
```
3835
# Start testrpc
39-
testrpc
36+
npm run test
4037
4138
# Start ethereum-bridge in another console window
4239
git clone https://github.com/oraclize/ethereum-bridge.git

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"scripts": {
1010
"lint": "npm run eslint; npm run solium",
11-
"eslint": "./node_modules/eslint/bin/eslint.js util/** test/**",
11+
"eslint": "./node_modules/eslint/bin/eslint.js util/** scripts/** test/**",
1212
"solium": "./node_modules/solium/bin/solium.js --dir ./contracts",
1313
"test": "npm run lint; truffle test",
1414
"testrpc": "testrpc"
Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,53 @@
1-
const fs = require("fs");
2-
const path = require("path");
3-
const mkdirp = require("mkdirp");
1+
const fs = require("fs")
2+
const path = require("path")
3+
const mkdirp = require("mkdirp")
44

55
const parseArtifact = (inFile, outDir, outFile, type = "abi") => {
66
fs.readFile(inFile, (err, data) => {
77
if (err) {
8-
console.error("Failed to read " + inFile + ": " + err);
8+
console.error("Failed to read " + inFile + ": " + err)
99
} else {
10-
const json = JSON.parse(data);
10+
const json = JSON.parse(data)
1111

12-
let jsonData;
12+
let jsonData
1313

1414
if (type == "bin") {
15-
jsonData = json.unlinked_binary;
15+
jsonData = json.unlinked_binary
1616
} else {
17-
jsonData = JSON.stringify(json.abi);
17+
jsonData = JSON.stringify(json.abi)
1818
}
1919

2020

2121
mkdirp(outDir, err => {
2222
if (err) {
23-
console.error("Failed to ensure directory " + outDir + ": " + err);
23+
console.error("Failed to ensure directory " + outDir + ": " + err)
2424
}
2525

2626
fs.writeFile(outFile, jsonData, err => {
2727
if (err) {
28-
console.error("Failed to write " + outFile + ": " + err);
28+
console.error("Failed to write " + outFile + ": " + err)
2929
}
30-
});
31-
});
30+
})
31+
})
3232
}
33-
});
34-
};
33+
})
34+
}
3535

36-
const ARTIFACT_DIR = path.resolve(__dirname, "build/contracts");
37-
const ABI_DIR = path.resolve(__dirname, "abi");
38-
const BIN_DIR = path.resolve(__dirname, "bin");
36+
const ARTIFACT_DIR = path.resolve(__dirname, "../build/contracts")
37+
const ABI_DIR = path.resolve(__dirname, "../abi")
38+
const BIN_DIR = path.resolve(__dirname, "../bin")
3939

4040
fs.readdir(ARTIFACT_DIR, (err, files) => {
4141
if (err) {
42-
console.error("Failed to read " + ARTIFACT_DIR + ": " + err);
42+
console.error("Failed to read " + ARTIFACT_DIR + ": " + err)
4343
} else {
4444
files.forEach(filename => {
45-
const artifactFile = path.join(ARTIFACT_DIR, filename);
46-
const abiFile = path.join(ABI_DIR, path.basename(filename, ".json") + ".abi");
47-
const binFile = path.join(BIN_DIR, path.basename(filename, ".json") + ".bin");
45+
const artifactFile = path.join(ARTIFACT_DIR, filename)
46+
const abiFile = path.join(ABI_DIR, path.basename(filename, ".json") + ".abi")
47+
const binFile = path.join(BIN_DIR, path.basename(filename, ".json") + ".bin")
4848

49-
parseArtifact(artifactFile, ABI_DIR, abiFile, "abi");
50-
parseArtifact(artifactFile, BIN_DIR, binFile, "bin");
51-
});
49+
parseArtifact(artifactFile, ABI_DIR, abiFile, "abi")
50+
parseArtifact(artifactFile, BIN_DIR, binFile, "bin")
51+
})
5252
}
53-
});
53+
})

0 commit comments

Comments
 (0)