The Trellis SPA for conducting administered interviews.
Automatic releases are triggered when a new tag matching v*
is created. This process takes about 5 minutes and is the simplest way to release everything. Find the new release under the releases section in Github.
npm version prerelease
ORnpm version minor
ORnpm version major
git push
git push --tags
npm install
- Install Cordova (
npm i -g [email protected]
) - Add
config.js
file instatic/
. Look atstatic/config.default.js
for template. - Create a
config-xml.prod.js
file inconfig/
. The template isconfig/config-xml.default.js
. - Optional: Configure Sentry by adding a
.sentryclirc
file and logging in withsentry-cli login
. See Sentry docs for more info.
# .sentryclirc
[defaults]
org=your-org-here
project=your-project-here
npm run build:web
- Serve files from the
www
directory that gets generated - We release web bundles each time we create a new version of Trellis. If you're only interested in deploying Trellis to a server see the documentation for Trellis API for details on how to use our releases instead.
npm run build:android
- Find the generated APK at
platforms/android/app/build/outputs/apk/debug/app-debug.apk
- Generate a keystore first
npm run release:android -- --storePassword your_store_password --password your_key_password --keystore path_to_keystore --alias your_key_alias
- Find the generated APK at
platforms/android/app/build/outputs/apk/release/app.apk
TODO
We welcome pull requests!
A simplified Docker configuration for development is in progress. Contact us if you need this now.
This step is similar to the configuration required to create a release.
- Add
config.js
file instatic/
. Look atstatic/config.default.js
for template. TheapiRoot
should point to your development API server. - Add
config-xml.dev.js
file inconfig/
. The template isconfig/config-xml.dev.default.js
. Point theCONTENT_SOURCE
to your Webpack development server. - Prepare cordova
- Install cordova
- Install cordova Android dependencies
- run
cordova prepare
- Start the Webpack development server with
npm start
- Make the Android development build with
npm run build:dev:android
. This will install the generated APK on a device or emulator running on the PC. This command only needs to be run the first time you build Trellis or when Cordova plugins are changed.
TODO
Many errors in the build process are caused by not removing or changing plugins correctly. The simplest remedy is to simply run cordova platform rm android && cordova platform add android
to reinstall them all with fresh configuration.
You may also need to add the plugins again using cordova plugin add {name}
after removing and adding the platform.
All unit tests can be run with npm run unit
. To debug tests in Chrome use karma start test/unit/karma.conf.js --browsers=Chrome
Service tests run in a Cordova app via the ServiceTesting component. They run in the Cordova environment so it is easy to test both versions of each service.
Trellis documentation is very much a work in progress and we welcome any contributions to these resources by the community. Trellis has an internal documentation viewer which can be accessed from almost anywhere within the application.
Changes to the documentation will automatically reload when developing. Any files that are added should also be added to _Sidebar.md
so that it can be navigated to directly by any Markdown viewer.
Update the src/components/documentation/DocsFiles.ts
to add files to the documentation. Use this file to reference any links to the documentation throughout your code. This will help prevent accidentally creating broken links to documentation. To create a documentation link in the navigation use the DocsLinkMixin
. This will make the help icon link directly to the relevant file for the current view.