Skip to content

Commit

Permalink
fixed(preloads): edgejs globals file only needs registered in 'web' e…
Browse files Browse the repository at this point in the history
…nvironment.
  • Loading branch information
tomgobich committed Oct 27, 2024
1 parent 4daebb8 commit 003c784
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ All you need to do is install & configure Adocasts Jumpstart. It'll then:
- Views -> Pages
8. Adds Jumpstart's routes to your `routes.ts` file
9. Adds auth methods to your user model
10. Lastly, you can optionally uninstall `@adocasts.com/jumpstart`. Once everything is scaffolded, you no longer need it.

After that, be sure to update any new environment variables or configurations that may have been added from missing AdonisJS core packages, boot it up, and visit `/jumpstart`.

Expand Down
8 changes: 4 additions & 4 deletions src/scaffolds/jumpstart_scaffold.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export default class JumpstartScaffold extends BaseScaffold {

await this.codemods.makeUsingStub(stubsRoot, 'start/globals.stub', {})
await this.codemods.updateRcFile((rcFile) => {
rcFile.addPreloadFile('#start/globals')
rcFile.addPreloadFile('#start/globals', ['web'])
})
}

Expand All @@ -197,9 +197,9 @@ export default class JumpstartScaffold extends BaseScaffold {
await this.copyView('emails')

// stubs -> migrations
this.stubMigration('migrations/create_email_histories_table.stub')
this.stubMigration('migrations/create_password_reset_tokens_table.stub')
this.stubMigration('migrations/create_remember_me_tokens_table.stub')
await this.stubMigration('migrations/create_email_histories_table.stub')
await this.stubMigration('migrations/create_password_reset_tokens_table.stub')
await this.stubMigration('migrations/create_remember_me_tokens_table.stub')

// stubs -> models
await this.copyModel('email_history.stub')
Expand Down

0 comments on commit 003c784

Please sign in to comment.