feat(parser): add Resource.cwd()
static method
All checks were successful
Actions / Build and Push Documentation (push) Successful in 18s
All checks were successful
Actions / Build and Push Documentation (push) Successful in 18s
this method creates a `Resource` instance using the output of `process.cwd()`
This commit is contained in:
parent
95f8e358dd
commit
3ec07c7235
2 changed files with 9 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@packwizjs/parser",
|
||||
"module": "src/index.ts",
|
||||
"version": "1.1.2",
|
||||
"version": "1.2.0",
|
||||
"type": "module",
|
||||
"description": "A simple library for parsing Packwiz TOML files",
|
||||
"author": {
|
||||
|
|
|
@ -155,4 +155,12 @@ export class Resource {
|
|||
}
|
||||
return new Resource(path.join(this.path, ...segments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new Resource instance with the current working directory.
|
||||
* @returns A new Resource instance with the current working directory.
|
||||
*/
|
||||
static cwd(): Resource {
|
||||
return new Resource(process.cwd());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue