2 Commits

Author SHA1 Message Date
6a9b39cb4e 0.1.7 2023-12-11 13:18:52 +01:00
a7b681a8f2 add currentDir to pnpm execution 2023-12-11 13:18:48 +01:00
3 changed files with 7 additions and 6 deletions

View File

@@ -106,8 +106,8 @@ export const Default: Story = {
}
// Execute formatting and linting commands
runCommand("pnpm", "run", "format:file", dirPath)
runCommand("pnpm", "run", "lint:file", dirPath+"/**")
runCommand(currentDir, "pnpm", "run", "format:file", dirPath)
runCommand(currentDir, "pnpm", "run", "lint:file", dirPath+"/**")
return nil
}
@@ -149,8 +149,9 @@ func updateMainIndex(name, currentDir string) error {
return nil
}
func runCommand(command string, args ...string) {
func runCommand(currentDir, command string, args ...string) {
cmd := exec.Command(command, args...)
cmd.Dir = currentDir // Set the working directory
output, err := cmd.CombinedOutput()
if err != nil {
fmt.Println("Error executing command:", err)

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "@ershisan99/create-react-component",
"version": "0.1.6",
"version": "0.1.7",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@ershisan99/create-react-component",
"version": "0.1.6",
"version": "0.1.7",
"hasInstallScript": true,
"dependencies": {
"@ershisan99/go-npm": "^0.1.14"

View File

@@ -1,6 +1,6 @@
{
"name": "@ershisan99/create-react-component",
"version": "0.1.6",
"version": "0.1.7",
"private": false,
"repository": "https://github.com/ershisan99/create-react-component",
"description": "A simple CLI tool to create react component",