HY Brain & Mind Drupal project.
- Docker
- DDEV - Get started
- Volta - Get started
- Get database dump from Anni Kinnari
For the first time:
- Get database dump and place it to repo root as
dump.sql. - Then run following commands:
ddev start
ddev import-db --file=dump.sql
ddev composer install
ddev drush sapi-rt research_group
ddev drush sapi-i research_group
ddev describeReady! Now go to http://hy-brain-and-mind.ddev.site/ to see your site.
This will log you inside the app container:
ddev sshWe have a VueJS application that is attached to the Drupal site. It can be accessed from /search-app. It is a simple
search interface for Drupal's Search API with suggestions.
Install node dependencies:
(cd public/modules/custom/bnm_frontend/js/search && pnpm install --frozen-lockfile)Start development:
(cd public/modules/custom/bnm_frontend/js/search && pnpm run serve)Compile your application in production mode:
(cd public/modules/custom/bnm_frontend/js/search && pnpm run build)You'll find your compiled application in the /dist directory in two different bundles:
/js/app.jsis the compiled VueJS application/css/app.cssis the compiled VueJS applications styles
npm run <script> |
Description |
|---|---|
serve |
Starts to watch files and recompiles the application whenever they change. |
serve:production |
Same as serve, but will run in production mode, meaning it will fetch production data for the search results. |
build |
Compiles the application in production mode into the /dist directory. |
build:development |
Same as build, but will run in development mode, meaning it will fetch localhost data for the search results. |
We follow Airbnb JavaScript coding standards. More info: https://github.com/airbnb/javascript