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",
|
"name": "@packwizjs/parser",
|
||||||
"module": "src/index.ts",
|
"module": "src/index.ts",
|
||||||
"version": "1.1.2",
|
"version": "1.2.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"description": "A simple library for parsing Packwiz TOML files",
|
"description": "A simple library for parsing Packwiz TOML files",
|
||||||
"author": {
|
"author": {
|
||||||
|
|
|
@ -155,4 +155,12 @@ export class Resource {
|
||||||
}
|
}
|
||||||
return new Resource(path.join(this.path, ...segments));
|
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