Skip to content

Commit 2b88691

Browse files
rynobeyDale Marshall
authored andcommitted
Adhara customizations
1 parent 1d2ce9c commit 2b88691

File tree

5 files changed

+12
-6
lines changed

5 files changed

+12
-6
lines changed

lib/api.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class API {
3636
this.onTestsComplete = config.onTestsComplete || this.defaultHook;
3737
this.onCompileComplete = config.onCompileComplete || this.defaultHook;
3838
this.onIstanbulComplete = config.onIstanbulComplete || this.defaultHook;
39+
this.onPreCompile = config.onPreCompile || this.defaultHook;
3940

4041
this.server = null;
4142
this.defaultPort = 8555;

package.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
{
2-
"name": "solidity-coverage",
2+
"name": "adhara-solidity-coverage",
33
"version": "0.7.16",
4-
"description": "",
4+
"description": "Customized version of the public solidity-coverage truffle plugin",
55
"main": "plugins/nomiclabs.plugin.js",
66
"bin": {
77
"solidity-coverage": "./plugins/bin.js"
88
},
9+
"publishConfig": {
10+
"registry": "https://adhara.jfrog.io/artifactory/api/npm/smart-contract-modules/"
11+
},
912
"directories": {
1013
"test": "test"
1114
},
@@ -16,10 +19,10 @@
1619
"test:debug": "node --max-old-space-size=4096 ./node_modules/.bin/mocha test/units/* --timeout 100000 --no-warnings --exit",
1720
"netlify": "./scripts/run-netlify.sh"
1821
},
19-
"homepage": "https://github.com/sc-forks/solidity-coverage",
22+
"homepage": "https://github.com/AdharaProjects/solidity-coverage",
2023
"repository": {
2124
"type": "git",
22-
"url": "https://github.com/sc-forks/solidity-coverage.git"
25+
"url": "https://github.com/AdharaProjects/solidity-coverage.git"
2326
},
2427
"author": "",
2528
"license": "ISC",
20 KB
Binary file not shown.

plugins/resources/plugin.utils.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ function toRelativePath(pathToFile, pathToParent){
9494
function getTempLocations(config){
9595
const contractsRoot = path.parse(config.contractsDir).dir
9696
const cwd = config.workingDir;
97-
const contractsDirName = '.coverage_contracts';
97+
const contractsDirName = config.coverage_contracts_temp || '.coverage_contracts';
9898
const artifactsDirName = config.temp || '.coverage_artifacts';
9999

100100
return {
@@ -292,7 +292,6 @@ async function finish(config, api){
292292
} = getTempLocations(config);
293293

294294
shell.config.silent = true;
295-
shell.rm('-Rf', tempContractsDir);
296295
shell.rm('-Rf', tempArtifactsDir);
297296
shell.config.silent = false;
298297

plugins/truffle.plugin.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ async function plugin(config){
9393
config.all = true;
9494
config.compilers.solc.settings.optimizer.enabled = false;
9595

96+
// Run pre-compile hook;
97+
await api.onPreCompile(config);
98+
9699
// Compile Instrumented Contracts
97100
await truffle.contracts.compile(config);
98101
await api.onCompileComplete(config);

0 commit comments

Comments
 (0)