Add hash-file

This commit is contained in:
Hiromi.s
2017-04-12 17:05:10 +09:00
parent 900354065f
commit fdd5107b6a
4 changed files with 44 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
import hashFile = require('hash-file');
hashFile('tsconfig.json')
.then((hash: string) => {
});
const hash = hashFile.sync('tsconfig.json');

12
types/hash-file/index.d.ts vendored Normal file
View File

@@ -0,0 +1,12 @@
// Type definitions for hash-file 3.0
// Project: https://github.com/kevva/hash-file#readme
// Definitions by: Hiromi Shikata <https://github.com/HiromiShikata>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export = hash_file;
declare function hash_file(src: string): Promise<string>;
declare namespace hash_file {
function sync(src: string): string;
}

View File

@@ -0,0 +1,22 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"hash-file-tests.ts"
]
}

View File

@@ -0,0 +1,3 @@
{
"extends": "../tslint.json"
}