Capitalizing contract filename

This commit is contained in:
Richard Ramos 2018-10-15 08:36:59 -04:00 committed by Pascal Precht
parent 695b2980e6
commit 60bb3b5b4a
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@ class ScaffoldingSolidity {
}
_generateFile(contract, templateFilename, extension, data, overwrite){
const filename = contract.className.toLowerCase() + '.' + extension;
const filename = capitalize(contract.className.toLowerCase()) + '.' + extension;
const filePath = './contracts/' + filename;
if (!overwrite && fs.existsSync(filePath)){
throw new Error("file '" + filePath + "' already exists");