|
|
|
@ -1,7 +1,7 @@ |
|
|
|
|
|
|
|
|
|
export function normalizeContractPath(contractPath: string, returnPath?: boolean): string | string[]{ |
|
|
|
|
export function normalizeContractPath(contractPath: string): string[]{ |
|
|
|
|
const paths = contractPath.split('/') |
|
|
|
|
const filename = paths[paths.length - 1].split('.')[0] |
|
|
|
|
const filename = paths[paths.length - 1] |
|
|
|
|
let folders = '' |
|
|
|
|
for (let i = 0; i < paths.length - 1; i++) { |
|
|
|
|
if(i !== paths.length -1) { |
|
|
|
@ -9,9 +9,5 @@ export function normalizeContractPath(contractPath: string, returnPath?: boolean |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
const resultingPath = `${folders}${filename}` |
|
|
|
|
if(returnPath) { |
|
|
|
|
return [folders,resultingPath, filename] |
|
|
|
|
} else { |
|
|
|
|
return resultingPath |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|