Skip to content

Instantly share code, notes, and snippets.

View hawkeye64's full-sized avatar

Jeff Galbraith hawkeye64

View GitHub Profile
@hawkeye64
hawkeye64 / index.js
Last active February 18, 2019 16:24
dotenv index.js final
const
fs = require('fs'),
path = require('path')
const extendQuasarConf = function (api, conf) {
let envName = '.env' // default name
// get .env name based on dev or production
if (conf.ctx.dev === true) {
// your prompt data is in api.prompts
@hawkeye64
hawkeye64 / index.js
Created February 18, 2019 16:20
dotenv module exports in index.js
module.exports = function (api, ctx) {
api.extendQuasarConf((conf) => {
extendWithDotenv(api, conf)
})
}
@hawkeye64
hawkeye64 / ctx.js
Last active February 18, 2019 16:17
ctx/contect data
{
dev: true,
prod: false,
mode: { spa: true },
modeName: 'spa',
target: {},
targetName: undefined,
emulator: undefined,
arch: {},
archName: undefined,
@hawkeye64
hawkeye64 / dotenv-install-results.json
Created February 18, 2019 16:13
dotenv install results
{
"dotenv": {
"env_development": ".env",
"env_production": ".env"
}
}
app:extension Installing "dotenv" Quasar App Extension +0ms
? Name of .env for development: .env
? Name of .env for production: .env
app:extension Running App Extension install script... +9s
app:extension-manager Adding "dotenv" extension prompts to /quasar.extensions.json ... +297ms
app:extension Quasar App Extension "dotenv" successfully installed. +6ms
@hawkeye64
hawkeye64 / prompts.js
Created February 18, 2019 16:04
dotenv prompts.js
module.exports = function () {
return [
{
type: 'input',
name: 'env_development',
message: "Name of .env for development:",
default: ".env"
},
{
type: 'input',
@hawkeye64
hawkeye64 / app_extension_installation.txt
Created February 18, 2019 14:59
app extension install
___
/ _ \ _ _ __ _ ___ __ _ _ __
| | | | | | |/ _` / __|/ _` | '__|
| |_| | |_| | (_| \__ \ (_| | |
\__\_\\__,_|\__,_|___/\__,_|_|
? Quasar App Extension name (without prefix) dotenv
? Project description dotenv app extension for Quasar
@hawkeye64
hawkeye64 / MyLayout.vue
Created February 18, 2019 14:50
MyLayout script section
<script>
import { openURL } from 'quasar'
export default {
name: 'MyLayout',
data () {
return {
leftDrawerOpen: this.$q.platform.is.desktop
}
},
@hawkeye64
hawkeye64 / index.js
Last active February 18, 2019 14:44
dotenv App Extension index.js
/**
 * Quasar App Extension index/runner script
 * (runs on each dev/build)
 *
 * API: https://github.com/quasarframework/quasar/blob/master/app/lib/app-extension/IndexAPI.js
 */
const
  fs = require('fs'),
  path = require('path')
.q-if-focused:not(.q-if-readonly) {
box-shadow: 0 0px 3px 1px rgb(0, 110, 255);
}