-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add create command and some alias for command
- Loading branch information
Showing
11 changed files
with
71 additions
and
26 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 |
---|---|---|
|
@@ -137,4 +137,3 @@ dist | |
.idea | ||
|
||
.config/shelve* | ||
shelve* |
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,9 +1,11 @@ | ||
NUXT_PUBLIC_SITE_URL="http://localhost:3000" | ||
NUXT_PRIVATE_AUTH_SECRET="your_auth_secret" | ||
NUXT_PRIVATE_ENCRYPTION_KEY="your_secret_encryption_key" | ||
NUXT_PRIVATE_RESEND_API_KEY="your_api_key" | ||
NUXT_PRIVATE_REDIS_URL="redis://:your_password@localhost:6379" | ||
NUXT_SESSION_PASSWORD="your_session_password" | ||
NUXT_OAUTH_GITHUB_CLIENT_ID="your_github_client_id" | ||
NUXT_OAUTH_GITHUB_CLIENT_SECRET="your_github_client_secret" | ||
DATABASE_URL="your_database_url" | ||
# Generated by Shelve CLI | ||
NUXT_PUBLIC_SITE_URL=your_value | ||
NUXT_PRIVATE_RESEND_API_KEY=your_value | ||
NUXT_PRIVATE_AUTH_SECRET=your_value | ||
NUXT_PRIVATE_ENCRYPTION_KEY=your_value | ||
NUXT_PRIVATE_REDIS_URL=your_value | ||
NUXT_OAUTH_GITHUB_CLIENT_ID=your_value | ||
NUXT_OAUTH_GITHUB_CLIENT_SECRET=your_value | ||
DATABASE_URL=your_value | ||
NUXT_SESSION_PASSWORD=your_value | ||
SHELVE_TOKEN=your_value |
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
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,32 @@ | ||
import { Command } from 'commander' | ||
import { intro, isCancel, outro, text } from '@clack/prompts' | ||
import { createProject } from '../utils/project' | ||
import { onCancel } from '../utils' | ||
import { createShelveConfig } from '../utils/config' | ||
|
||
export function createCommand(program: Command): void { | ||
program | ||
.command('create') | ||
.alias('c') | ||
.alias('init') | ||
.description('Create a new project') | ||
.action(async () => { | ||
intro('Create a new project') | ||
|
||
const name = await text({ | ||
message: 'Enter the name of the project:', | ||
placeholder: 'my-project', | ||
validate(value) { | ||
if (value.length === 0) return `Value is required!` | ||
}, | ||
}) | ||
|
||
if (isCancel(name)) onCancel('Operation cancelled.') | ||
|
||
await createProject(name) | ||
|
||
outro(`Project ${name} created successfully`) | ||
|
||
await createShelveConfig(name) | ||
}) | ||
} |
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
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
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
File renamed without changes.