@disasterlogic/disasterbot v0.0.4
DisasterBot
A disaster remediation assistant
Terminology
- GIT Flow: https://datasift.github.io/gitflow/IntroducingGitFlow.html
- Versioning: https://semver.org
- API: Google Cloud Functions, code lives in functions
- app: StencilJS app, code lives in src
Getting Started
When you first pull down the repo run the following to get the dependencies installed and open the app in the browser with live reloading.
npm install
npm startIf you wish to work on the API then run the following command:
cd functions
npm install
npm run serveWorking
When you want to work on the front-end run the following command to have it open a livereloading browser instance.
npm startWhen you want to work on the back-end run the following command to have it emulate cloud functions on your local machine. (NOTE: Triggers that have to do with Auth, Firestore, and other watchers will only run on a server. HTTP(S) functions will run locally)
npm run apiBuild Commands
npm run androidRuns a build with the dev environment with our custom cordova flag on the stencil compiler and then runs the app via Cordova
npm run apiRuns npm run serve command in functions directory to start the firebase back-end server locally.
Read More about Firebase Functions Emulator...
npm run api:testRuns Jest test suite on the API Read More about Jest...
npm run api:test:watchRuns Jest test suite on the API with livereloading / watcher Read More about Jest...
npm run buildRuns a stencil build with no environment
npm run build:appRuns a build with the dev environment with our custom cordova flag on the stencil compiler and then builds an android App via Cordova
npm run build:prerenderRuns a stencil build with no environment and the prerender flag
Read More about StencilJS Prerendering...
npm run build:statsRuns a stencil build with no environment and the stats flag
npm run copyCopy files using enjin.copy key in package.json
npm run deploy:apiLints the API files and auto-fixes what it can, then it runs the test suites, and finally deploys to firebase
Read More about Firebase Deploy...
npm run deploy:api:liveLints the API files and auto-fixes what it can, then it runs the test suites, and finally deploys to live firebase
Read More about Firebase Deploy...
npm run deploy:appLints the app files and auto-fixes what it can, then it runs a build for the dev environment, and finally deploys to firebase
Read More about Firebase Deploy...
npm run deploy:app:liveLints the app files and auto-fixes what it can, then it runs a build for the dev environment, and finally deploys to live firebase
Read More about Firebase Deploy...
npm run deploy:docsBuilds docs for API with APIDoc and app with TypeDoc and then deploys to firebase
npm run devRuns local build and serves it in browser with livesyncing via BrowserSync
Read More about BrowserSync...
npm run dev:androidRuns local build and serves it in mobile device with livereloading
npm run docsBuilds docs for API with APIDoc and app with TypeDoc
npm run docs:apiBuilds docs for API with APIDoc Read More about APIDoc...
npm run docs:appBuilds docs for app with TypeDoc Read More about TypeDoc...
npm run envCopy over proper front-end environment config into src/global/environment.ts
npm run git:prepushCommands that Husky runs before pushing to GIT remote. Currently runs linting and a build. (NOTE: Should consider running tests in here as well) Read More about Husky...
npm run lintRuns linting on both the API and the app using TSLint Read More about TSLint...
npm run lint:fixRuns linting on both the API and the app using TSLint and auto-fixes anything that it can Read More about TSLint...
npm run lint:apiRuns linting on the API using TSLint Read More about TSLint...
npm run lint:api:fixRuns linting on the API using TSLint and auto-fixes anything that it can Read More about TSLint...
npm run lint:appRuns linting on the app using TSLint Read More about TSLint...
npm run lint:app:fixRuns linting on the app using TSLint and auto-fixes anything that it can Read More about TSLint...
npm run serveAlias for npm run sync
npm run startAlias for npm run dev
npm run syncRuns the livereloading server via BrowserSync without running a build or watching for changes. Read More about BrowserSync...
npm run testRuns Jest test suite on the app Read More about Jest...
npm run test:watchRuns Jest test suite on the app with livereloading / watcher Read More about Jest...
npm run test:apiAlias for npm run api:test
npm run test:api:watchAlias for npm run api:test:watch