From 75f09fbfa75c027177d384bf0a5f68a8b2dd1475 Mon Sep 17 00:00:00 2001 From: Yanis Benson Date: Wed, 4 Mar 2020 01:51:53 +0300 Subject: [PATCH] docs --- index.d.ts | 2 +- readme.md | 27 +++++++++++++++++++-------- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/index.d.ts b/index.d.ts index 3b056aa..a9f6cbe 100644 --- a/index.d.ts +++ b/index.d.ts @@ -29,7 +29,7 @@ declare namespace cpy { /** File extension. - @example `.bar` + @example `bar` */ readonly extension: string, } diff --git a/readme.md b/readme.md index e0ce8e0..9e1c97c 100644 --- a/readme.md +++ b/readme.md @@ -127,27 +127,38 @@ const cpy = require('cpy'); ###### path -Type: `string` +Type: `string`\ +Example: `/tmp/foo.bar` + +Resolved path to file. + +###### relativePath + +Type: `string`\ +Example: `dir/foo.bar` if `cwd` was `/tmp` -Resolved path to file. Example: `/tmp/foo.bar`. +Relative path to file from `cwd`. ###### name -Type: `string` +Type: `string`\ +Example: `foo.bar` -Filename. Example: `foo.bar`. +Filename. ###### nameWithoutExtension -Type: `string` +Type: `string`\ +Example: `foo`. -File name without extension. Example: `foo`. +File name without extension. ###### extension -Type: `string` +Type: `string`\ +Example: `bar`. -File extension. Example: `.bar`. +File extension. ## Progress reporting