|
|
@ -286,9 +286,15 @@ class App { |
|
|
|
postProcessPure(env) { |
|
|
|
postProcessPure(env) { |
|
|
|
shell.ls(`${env}/**/*.sol`).forEach(file => { |
|
|
|
shell.ls(`${env}/**/*.sol`).forEach(file => { |
|
|
|
const contractPath = this.platformNeutralPath(file); |
|
|
|
const contractPath = this.platformNeutralPath(file); |
|
|
|
let contract = fs.readFileSync(contractPath).toString(); |
|
|
|
const contract = fs.readFileSync(contractPath).toString(); |
|
|
|
contract = preprocessor.run(contract); |
|
|
|
const contractProcessed = preprocessor.run(contract); |
|
|
|
fs.writeFileSync(contractPath, contract); |
|
|
|
if (contractProcessed.name && contractProcessed.name === 'SyntaxError' && file.slice(-15) !== 'SimpleError.sol') { |
|
|
|
|
|
|
|
console.log(`Warning: The file at ${file} was identified as a Solidity Contract, ` + |
|
|
|
|
|
|
|
'but did not parse correctly. You may ignore this warning if it is not a Solidity file, ' + |
|
|
|
|
|
|
|
'or your project does not use it'); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
fs.writeFileSync(contractPath, contractProcessed); |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|