This repository has been archived by the owner on Dec 10, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(cli): config folder * version(cli): release 0.8.0
- Loading branch information
1 parent
2e1ff92
commit d6a6b51
Showing
5 changed files
with
39 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "@pergel/cli", | ||
"type": "module", | ||
"version": "0.7.1", | ||
"version": "0.8.0", | ||
"packageManager": "[email protected]", | ||
"description": "Full Stack Nuxt Application. It contains the necessary toolkits for a software developer and a fast, clean, tested toolkit.", | ||
"author": "Mehmet @productdevbook", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { definePergel } from 'pergel' | ||
|
||
export default definePergel({ | ||
|
||
}) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { accessSync, mkdirSync, writeFileSync } from 'node:fs' | ||
import { dirname } from 'node:path' | ||
|
||
async function isExists(path: string) { | ||
try { | ||
accessSync(path) | ||
return true | ||
} | ||
catch { | ||
return false | ||
} | ||
}; | ||
|
||
export async function writeFilePergel(filePath: string, data: any) { | ||
try { | ||
const _dirname = dirname(filePath) | ||
const exist = await isExists(_dirname) | ||
if (!exist) | ||
mkdirSync(_dirname, { recursive: true }) | ||
|
||
writeFileSync(filePath, data, 'utf8') | ||
} | ||
catch (err: any) { | ||
throw new Error(err) | ||
} | ||
} |