Skip to content

Commit

Permalink
feat(create-tensei-app): update start command in typescript template
Browse files Browse the repository at this point in the history
  • Loading branch information
bahdcoder committed Aug 3, 2021
1 parent be8100e commit a02c5b4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 19 deletions.
2 changes: 1 addition & 1 deletion packages/core/Tensei.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export class Tensei implements TenseiContract {

if (this.ctx.databaseConfig.type === 'sqlite') {
this.ctx.databaseConfig.dbName =
process.env.DATABASE_NAME || this.ctx.name.toLowerCase()
process.env.DATABASE_NAME || `${this.ctx.name}.sqlite`.toLowerCase()
}

if (
Expand Down
14 changes: 5 additions & 9 deletions packages/create-tensei-app/templates/typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
{
"name": "@tensei/typescript-app",
"version": "0.8.7",
"version": "0.9.0",
"main": "index.js",
"license": "MIT",
"dependencies": {
"@mikro-orm/sqlite": "^4.4.0",
"@tensei/cms": "^0.9.0",
"@tensei/core": "^0.9.0",
"@tensei/graphql": "^0.9.0",
"@tensei/mde": "^0.9.0",
"@tensei/media": "^0.9.0",
"@tensei/social-auth": "^0.9.0"
"@tensei/auth": "^0.9.0"
},
"scripts": {
"dev": "nodemon --ext 'ts,js' --exec 'ts-node src/index.ts'",
"dev": "ts-node-dev --respawn src/index.ts",
"build": "tsc",
"start": "node build/index.js"
},
"devDependencies": {
"@types/node": "^15.12.4",
"nodemon": "^2.0.7",
"ts-node": "^10.0.0",
"ts-node-dev": "^1.1.8",
"typescript": "^4.3.4"
},
"private": true
}
}
11 changes: 2 additions & 9 deletions packages/create-tensei-app/templates/typescript/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
import { cms } from '@tensei/cms'
import { auth } from '@tensei/auth'
import { graphql } from '@tensei/graphql'
import { welcome, tensei, cors } from '@tensei/core'

tensei()
export default tensei()
.root(__dirname)
.plugins([
welcome(),
cms().plugin(),
auth().plugin(),
graphql().plugin(),
cors()
])
.plugins([welcome(), auth().plugin(), graphql().plugin(), cors()])
.start()
.catch(console.error)

0 comments on commit a02c5b4

Please sign in to comment.