Skip to content

Commit

Permalink
back to npm. yarn run had a conflict.
Browse files Browse the repository at this point in the history
`npm run query` feels better than `yarn query` even though it's longer. A distinction between a package and a script. Also gitpod already ships with npm installed. and without running npm i it uses an old version of npx which shows a warning. So this will squash that warning too
  • Loading branch information
mcgrealife committed Mar 8, 2023
1 parent ec71c14 commit 697cdf9
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ tasks:
before: echo 'before'
init: |
gp open welcome.md
yarn
npm i
curl --proto '=https' --tlsv1.2 -sSf https://sh.edgedb.com | sh -s -- -y -v
edgedb project init --non-interactive
mv default.esdl dbschema
edgedb migration create --non-interactive && edgedb migration apply && yarn generate
edgedb migration create --non-interactive && edgedb migration apply && npm run generate
gp open dbschema/default.esdl
command: |
if test -e /home/gitpod/.local/bin/edgedb; then echo 'EdgeDB CLI installed successfully' && gp open src/index.ts; else gp open restart.md && curl --proto '=https' --tlsv1.2 -sSf https://sh.edgedb.com | sh -s -- -y -v && edgedb project init --server-instance=edgedb --non-interactive; fi
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"type": "module",
"scripts": {
"build": "tsc",
"query": "yarn build && node dist/src",
"migrate": "edgedb migration create && edgedb migration apply && yarn generate",
"query": "npm run build && node dist/src",
"migrate": "edgedb migration create && edgedb migration apply && npm run generate",
"generate": "npx @edgedb/generate edgeql-js && npx @edgedb/generate interfaces && npx @edgedb/generate queries --file",
"ui": "edgedb ui --print-url"
},
Expand Down
6 changes: 3 additions & 3 deletions restart.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ As a Reminder:


### Commands
- `yarn migrate` - helper to create/apply migrations and run generators
- `yarn query` - **to execute your queries** transpiles ts to js, then runs node on 'dist/src/'
- `yarn ui` - returns edgedb ui link in terminal
- `npm run migrate` - helper to create/apply migrations and run generators
- `npm run query` - **to execute your queries** transpiles ts to js, then runs node on 'dist/src/'
- `npm run ui` - returns edgedb ui link in terminal
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// To execute this edgedb query, `yarn query`
// For 'e' to reference your latest schema, `yarn migrate`
// To view your database, `yarn ui`
// To execute this edgedb query, `npm run query`
// For 'e' to reference your latest schema, `npm run migrate`
// To view your database, `npm run ui`

import { createClient } from 'edgedb'
import e from '../dbschema/edgeql-js/index.mjs'
Expand Down
6 changes: 3 additions & 3 deletions welcome.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ Via .gitpod.yml
- query builder code `src/index.ts`

## Commands
- `yarn migrate` - helper to create/apply migrations and run generators
- `yarn query` - **to execute your queries** transpiles ts to js, then runs node on 'dist/src/'
- `yarn ui` - returns edgedb ui link in terminal
- `npm run migrate` - helper to create/apply migrations and run generators
- `npm run query` - **to execute your queries** transpiles ts to js, then runs node on 'dist/src/'
- `npm run ui` - returns edgedb ui link in terminal



0 comments on commit 697cdf9

Please sign in to comment.