Skip to content

Commit

Permalink
feat(#7): open browser on build:done (#23)
Browse files Browse the repository at this point in the history
* feat(#7): open browser on build:done

* chore(#7): update gitpod config
  • Loading branch information
Decipher authored Sep 26, 2021
1 parent e9d6c3a commit f022c8e
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 35 deletions.
71 changes: 36 additions & 35 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,36 @@ image:
file: .gitpod/.gitpod.Dockerfile

tasks:
# Nuxt/Druxt
- name: nuxt/druxt
# Drupal
- name: ddev/drupal
init: |
# Installing Nuxt/Druxt frontend.
.gitpod/setup-nuxt.sh
gp sync-done npm
# Installing DDev and Drupal backend.
.gitpod/download-ddev-images.sh
.gitpod/setup-drupal.sh
command: |
.gitpod/setup-nuxt.sh
gp sync-done npm
gp sync-await drupal
cd $GITPOD_REPO_ROOT/nuxt && NUXT_TELEMETRY_DISABLED=1 npm run dev
.gitpod/setup-ddev.sh
cd $GITPOD_REPO_ROOT/drupal && ddev start
gp sync-done drupal
# Nuxt/Storybook
# Nuxt/Storybook
- name: nuxt/storybook
command: |
gp sync-await npm
gp sync-await drupal
cd $GITPOD_REPO_ROOT/nuxt && NUXT_TELEMETRY_DISABLED=1 npx nuxt storybook --ci
# Drupal
- name: ddev/drupal
# Nuxt/Druxt
- name: nuxt/druxt
init: |
# Installing DDev and Drupal backend.
.gitpod/download-ddev-images.sh
.gitpod/setup-drupal.sh
# Installing Nuxt/Druxt frontend.
.gitpod/setup-nuxt.sh
gp sync-done npm
command: |
.gitpod/setup-ddev.sh
cd $GITPOD_REPO_ROOT/drupal && ddev start
gp sync-done drupal
.gitpod/setup-nuxt.sh
gp sync-done npm
clear && echo "Waiting for ddev/drupal..."
gp sync-await drupal
cd $GITPOD_REPO_ROOT/nuxt && NUXT_TELEMETRY_DISABLED=1 npm run dev
# VScode xdebug extension
vscode:
Expand All @@ -46,55 +47,55 @@ ports:
onOpen: ignore
visibility: public

# Nuxt/Druxt
# Nuxt/Druxt
- port: 3000
onOpen: ignore
visibility: public

# Nuxt/Druxt
# Nuxt/Druxt
- port: 3003
onOpen: ignore
visibility: public

# Currently un-notified and unsupported mailhog http port
# Currently un-notified and unsupported mailhog http port
- port: 8025
onOpen: ignore
# Currently un-notified and unsupported mailhog https port
# Currently un-notified and unsupported mailhog https port
- port: 8026
onOpen: ignore
# Currently un-notified and unsupported phpmyadmin http port
# Currently un-notified and unsupported phpmyadmin http port
- port: 8036
onOpen: ignore
# Currently un-notified and unsupported phpmyadmin https port
# Currently un-notified and unsupported phpmyadmin https port
- port: 8037
onOpen: ignore
# router http port that we're ignoring.
# router http port that we're ignoring.
- port: 8888
onOpen: ignore
# router https port that we're ignoring.
# router https port that we're ignoring.
- port: 8889
onOpen: ignore
# xdebug port
# xdebug port
- port: 9000
onOpen: ignore
# projector port
# projector port
- port: 9999

github:
prebuilds:
# enable for the master/default branch (defaults to true)
master: true
# enable for all branches in this repo (defaults to false)
# enable for all branches in this repo (defaults to false)
branches: true
# enable for pull requests coming from this repo (defaults to true)
# enable for pull requests coming from this repo (defaults to true)
pullRequests: true
# enable for pull requests coming from forks (defaults to false)
# enable for pull requests coming from forks (defaults to false)
pullRequestsFromForks: true
# add a check to pull requests (defaults to true)
# add a check to pull requests (defaults to true)
addCheck: true
# add a "Review in Gitpod" button as a comment to pull requests (defaults to false)
# add a "Review in Gitpod" button as a comment to pull requests (defaults to false)
addComment: false
# add a "Review in Gitpod" button to the pull request's description (defaults to false)
# add a "Review in Gitpod" button to the pull request's description (defaults to false)
addBadge: true
# add a label once the prebuild is ready to pull requests (defaults to false)
# add a label once the prebuild is ready to pull requests (defaults to false)
addLabel: true
7 changes: 7 additions & 0 deletions nuxt/nuxt.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import opn from 'opn'

const baseUrl = process.env.BASE_URL

export default {
Expand Down Expand Up @@ -45,5 +47,10 @@ export default {

// Build Configuration: https://go.nuxtjs.dev/config-build
build: {
},

hooks: {
// Open browser once build is done.
'build:done': () => opn('https://localhost:3000')
}
}
42 changes: 42 additions & 0 deletions nuxt/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions nuxt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,8 @@
"core-js": "3.17.3",
"druxt-site": "0.8.0",
"nuxt": "2.15.8"
},
"devDependencies": {
"opn": "^6.0.0"
}
}

0 comments on commit f022c8e

Please sign in to comment.