This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"dotenv": { | |
"env_development": ".env", | |
"env_production": ".env" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
dev: true, | |
prod: false, | |
mode: { spa: true }, | |
modeName: 'spa', | |
target: {}, | |
targetName: undefined, | |
emulator: undefined, | |
arch: {}, | |
archName: undefined, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function (api, ctx) { | |
api.extendQuasarConf((conf) => { | |
extendWithDotenv(api, conf) | |
}) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ quasar dev | |
Dev mode.......... spa | |
Pkg quasar........ v1.0.0-beta.2 | |
Pkg @quasar/app... v1.0.0-beta.4 | |
Debugging......... enabled | |
app:extension Running "dotenv" Quasar App Extension... +0ms | |
app:quasar-conf Reading quasar.conf.js +10ms | |
app:dev Checking listening address availability (0.0.0.0:8080)... +2ms |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"dotenv": { | |
"env_development": ".env.development", | |
"env_production": ".env.production" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
type: "input", | |
name: "common_root_object", | |
message: "Name of your Common Root Object:", | |
default: "none" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// for brevity | |
let target = conf.build.env | |
// check for common root object | |
if (api.prompts.common_root_object && api.prompts.common_root_object !== 'none') { | |
let rootObject = api.prompts.common_root_object | |
if (!target[rootObject]) { | |
target[rootObject] = {} | |
target = target[rootObject] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app:extension Installing "dotenv" Quasar App Extension +0ms | |
? Name of .env for development: .env.development | |
? Name of .env for production: .env.production | |
? Name of your Common Root Object: MyData | |
app:extension Running App Extension install script... +34s | |
app:extension-manager Adding "dotenv" extension prompts to /quasar.extensions.json ... +67ms | |
app:extension Quasar App Extension "dotenv" successfully installed. +1ms |