Skip to content

Commit

Permalink
fix: tweak texts (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
yusukebe authored Mar 28, 2024
1 parent 5f5f76a commit 19665c4
Show file tree
Hide file tree
Showing 8 changed files with 82 additions and 5 deletions.
10 changes: 10 additions & 0 deletions my-app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
node_modules
dist
.wrangler
.dev.vars

# Change them to your taste:
package-lock.json
yarn.lock
pnpm-lock.yaml
bun.lockb
8 changes: 8 additions & 0 deletions my-app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
```
npm install
npm run dev
```

```
npm run deploy
```
13 changes: 13 additions & 0 deletions my-app/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"scripts": {
"dev": "wrangler dev src/index.ts",
"deploy": "wrangler deploy --minify src/index.ts"
},
"dependencies": {
"hono": "^4.1.5"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20240208.0",
"wrangler": "^3.32.0"
}
}
9 changes: 9 additions & 0 deletions my-app/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Hono } from 'hono'

const app = new Hono()

app.get('/', (c) => {
return c.text('Hello Hono!')
})

export default app
16 changes: 16 additions & 0 deletions my-app/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "Bundler",
"strict": true,
"lib": [
"ESNext"
],
"types": [
"@cloudflare/workers-types"
],
"jsx": "react-jsx",
"jsxImportSource": "hono/jsx"
},
}
18 changes: 18 additions & 0 deletions my-app/wrangler.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name = "my-app"
compatibility_date = "2023-12-01"

# [vars]
# MY_VAR = "my-variable"

# [[kv_namespaces]]
# binding = "MY_KV_NAMESPACE"
# id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

# [[r2_buckets]]
# binding = "MY_BUCKET"
# bucket_name = "my-bucket"

# [[d1_databases]]
# binding = "DB"
# database_name = "my-database"
# database_id = ""
4 changes: 3 additions & 1 deletion src/hooks/dependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ const registerInstallationHook = (template: string) => {
spinner.stop().clear()

if (procExit == 0) {
console.log(`${chalk.green('✔')} Installed project dependencies`)
spinner.stopAndPersist({
symbol: chalk.green('✔'),
})
} else {
console.log(`${chalk.red('×')} Failed to install project dependencies`)
exit(procExit)
Expand Down
9 changes: 5 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function mkdirp(dir: string) {
}

async function main() {
console.log(chalk.gray(`\ncreate-hono version ${version}`))
console.log(chalk.gray(`create-hono version ${version}`))

const args = yargsParser(process.argv.slice(2))

Expand Down Expand Up @@ -132,8 +132,9 @@ async function main() {
},
)
emitter.clone(targetDirectoryPath).then(() => {
spinner.stop().clear()
console.log(`${chalk.green('✔')} Cloned the template`)
spinner.stopAndPersist({
symbol: chalk.green('✔'),
})
res({})
})
})
Expand All @@ -159,7 +160,7 @@ async function main() {
)
}

console.log(chalk.green(' ' + chalk.bold('Copied project files')))
console.log(chalk.green('🎉 ' + chalk.bold('Copied project files')))
console.log(chalk.gray('Get started with:'), chalk.bold(`cd ${target}`))
}

Expand Down

0 comments on commit 19665c4

Please sign in to comment.