+3
-3
@@ -27,10 +27,10 @@
|
||||
"@babel/core": "^7.12.3",
|
||||
"@babel/register": "^7.12.1",
|
||||
"@babel/runtime": "^7.12.1",
|
||||
"@polkadot/dev": "^0.59.1",
|
||||
"@polkadot/ts": "^0.3.49",
|
||||
"@polkadot/dev": "^0.59.3",
|
||||
"@polkadot/ts": "^0.3.50",
|
||||
"@polkadot/typegen": "workspace:packages/typegen",
|
||||
"@types/jest": "^26.0.14",
|
||||
"@types/jest": "^26.0.15",
|
||||
"copyfiles": "^2.4.0"
|
||||
},
|
||||
"version": "2.3.2-11"
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
"@polkadot/types": "2.3.2-11",
|
||||
"@polkadot/util": "^3.6.1",
|
||||
"@polkadot/util-crypto": "^3.6.1",
|
||||
"@polkadot/x-fetch": "^0.3.3",
|
||||
"@polkadot/x-ws": "^0.3.3",
|
||||
"@polkadot/x-fetch": "^0.3.4",
|
||||
"@polkadot/x-ws": "^0.3.4",
|
||||
"bn.js": "^5.1.3",
|
||||
"eventemitter3": "^4.0.7"
|
||||
},
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
export function writeFile (dest: string, generator: () => string, noLog?: boolean): void {
|
||||
!noLog && console.log(`${dest}\n\tGenerating`);
|
||||
@@ -19,6 +20,6 @@ export function writeFile (dest: string, generator: () => string, noLog?: boolea
|
||||
!noLog && console.log('');
|
||||
}
|
||||
|
||||
export function readTemplate (path: string): string {
|
||||
return fs.readFileSync(`${__dirname}/../templates/${path}.hbs`).toString();
|
||||
export function readTemplate (template: string): string {
|
||||
return fs.readFileSync(path.join(__dirname, `../templates/${template}.hbs`)).toString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user