Note: This guide applies to the project created by quasar-cli.
First install typescript and ts-loaderpackages in your project.
npm i -D typescript ts-loaderThen modified the quasar.conf.js file in your project:
| // unofficial sqlite3 types. | |
| // These are typed only for my scope | |
| declare module "@sqlite.org/sqlite-wasm" { | |
| type InitOptions = { | |
| print: (...msg: any[]) => void; | |
| printErr: (...msg: any[]) => void; | |
| }; | |
| declare type PreparedStatement = { | 
Note: This guide applies to the project created by quasar-cli.
First install typescript and ts-loaderpackages in your project.
npm i -D typescript ts-loaderThen modified the quasar.conf.js file in your project:
I recently started a new project and we used [Angular CLI][4] to get started. Angular CLI, as in the name, is a command line utility for creating and managing Angular 2 projects. Using Angular CLI to create a project is very easy and it gives you a great starting point for new Angular 2 projects. The only draw back I found was that in my mind it wasn't CI ready.
Angular CLI out of the box gives you a few unit tests and an end to end (e2e) test. This is great because you can generate a project and set up your build server to build the artefacts. This is where I ran into problems.
Having everything generated for you is great until something you want to do does not work; and this is where I was. I wanted to build and test my angular application on a headless build agent. The generated code from Angular CLI runs tests using Google Chrome by default. Which is fine, but running Google Chrome on a bui
| # See list of docker virtual machines on the local box | |
| $ docker-machine ls | |
| NAME ACTIVE URL STATE URL SWARM DOCKER ERRORS | |
| default * virtualbox Running tcp://192.168.99.100:2376 v1.9.1 | |
| # Note the host URL 192.168.99.100 - it will be used later! | |
| # Build an image from current folder under given image name | |
| $ docker build -t gleb/demo-app . | 
| #!/bin/bash | |
| url="https://gist.githubusercontent.com/RichardBronosky/2d04c7c2e9a5bea67cd9760a35415a3f/raw/install_mongo.sh" | |
| script="/tmp/userdata.sh" | |
| echo "Running userdata script as $(whoami) from $(pwd)" | |
| # Log commands to stdout and vicariously /var/log/cloud-init-output.log | |
| set -o xtrace | |
| # Exit on error | 
| #!/bin/bash | |
| url="https://gist.githubusercontent.com/RichardBronosky/2d04c7c2e9a5bea67cd9760a35415a3f/raw/install_mongo.sh" | |
| script="/tmp/userdata.sh" | |
| echo "Running userdata script as $(whoami) from $(pwd)" | |
| # Log commands to stdout and vicariously /var/log/cloud-init-output.log | |
| set -o xtrace | |
| # Exit on error | 
| { | |
| // The plugin looks for a .jsbeautifyrc file in the same directory as the | |
| // source file you're prettifying (or any directory above if it doesn't exist, | |
| // or in your home folder if everything else fails) and uses those options | |
| // along the default ones. | |
| // Details: https://github.com/victorporof/Sublime-HTMLPrettify#using-your-own-jsbeautifyrc-options | |
| // Documentation: https://github.com/einars/js-beautify/ | |
| "html": { | |
| "allowed_file_extensions": ["htm", "html", "xhtml", "shtml", "xml", "svg", "dust"], | 
| function map() { | |
| emit(1, { | |
| sum: this.value, // the field you want stats for | |
| min: this.value, | |
| max: this.value, | |
| count: 1, | |
| diff: 0 | |
| }); | |
| } | 
| // derived from http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Parallel_algorithm | |
| function map() { | |
| emit(1, // Or put a GROUP BY key here | |
| {sum: this.value, // the field you want stats for | |
| min: this.value, | |
| max: this.value, | |
| count:1, | |
| diff: 0, // M2,n: sum((val-mean)^2) | |
| }); |