Skip to content

Commit

Permalink
Merge pull request #109 from AthennaIO/develop
Browse files Browse the repository at this point in the history
feat(docs): add docs about new helpers
  • Loading branch information
jlenon7 authored Sep 7, 2023
2 parents ca93218 + 7881505 commit 182b608
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/getting-started/athennarc-file.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ resolve the paths of your application:
"logs": "storage/logs",
"tests": "tests",
"stubs": "tests/stubs",
"fixtures": "tests/fixtures",
}
}
```
Expand Down
36 changes: 36 additions & 0 deletions docs/the-basics/helpers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2338,6 +2338,22 @@ import { Is } from '@athenna/common'
Is.Windows() // true
```

#### `Is::Module()`

Validate if a path or `File` instance is a module:

```typescript
import { Is, File } from '@athenna/common'

Is.Module('./hello.js') // true
Is.Module('./hello.ts') // true
Is.Module('./hello.json') // false

Is.Module(new File('./hello.js')) // true
Is.Module(new File('./hello.ts')) // true
Is.Module(new File('./hello.json')) // false
```

#### `Is::Uuid()`

Validate if the value is a valid UUID v4:
Expand Down Expand Up @@ -3969,6 +3985,26 @@ import { Path } from '@athenna/common'
Path.setStubs('stubs/app')
```

#### `Path::fixtures()`

Merge the project root path with `Path.dirs.fixtures`:

```typescript
import { Path } from '@athenna/common'

console.log(Path.fixtures()) // /home/user/athenna-project/tests/fixtures
```

#### `Path::setFixtures()`

Set the `Path.dirs.fixtures` value:

```typescript
import { Path } from '@athenna/common'

Path.setFixtures('fixtures/app')
```

#### `Path::http()`

Merge the project root path with `Path.dirs.http`:
Expand Down

0 comments on commit 182b608

Please sign in to comment.