0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

feat: npm create compatibility

This commit is contained in:
Gao Sun 2022-10-10 22:11:08 +08:00
parent dddad56518
commit a5cd73d961
No known key found for this signature in database
GPG key ID: 13EBE123E4773688
4 changed files with 26 additions and 1 deletions

View file

@ -1,3 +1,4 @@
import chalk from 'chalk';
import dotenv from 'dotenv';
import yargs from 'yargs';
import { hideBin } from 'yargs/helpers';
@ -17,7 +18,7 @@ void yargs(hideBin(process.argv))
.command(install)
.command(database)
.demandCommand(1)
.showHelpOnFail(false)
.showHelpOnFail(false, `Specify ${chalk.green('--help')} for available options`)
.strict()
.parserConfiguration({
'dot-notation': false,

2
packages/create/index.sh Executable file
View file

@ -0,0 +1,2 @@
#!/bin/sh
logto init

View file

@ -0,0 +1,16 @@
{
"name": "@logto/create",
"version": "1.0.0-beta.10",
"author": "Silverhand Inc. <contact@silverhand.io>",
"license": "MPL-2.0",
"bin": {
"logto-create": "./index.sh"
},
"scripts": {},
"engines": {
"node": "^16.0.0"
},
"dependencies": {
"@logto/cli": "^1.0.0-beta.10"
}
}

View file

@ -406,6 +406,12 @@ importers:
supertest: 6.2.2
typescript: 4.7.4
packages/create:
specifiers:
'@logto/cli': ^1.0.0-beta.10
dependencies:
'@logto/cli': link:../cli
packages/demo-app:
specifiers:
'@logto/core-kit': ^1.0.0-beta.13