Skip to content
Official Quasar App Extension for dotenv
JavaScript
Branch: dev
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
demo chore(docs): update demo Jul 11, 2019
docs chore(docs): update demo Jul 11, 2019
src
.editorconfig chore: #5 .git in npm release, update dependencies May 3, 2019
.eslintrc.js chore: #5 .git in npm release, update dependencies May 3, 2019
.gitignore chore: Update .gitignore Mar 25, 2019
.npmignore chore: update demo Jun 6, 2019
LICENSE Initial commit Feb 17, 2019
README.md
_redirects chore: update demo Jun 6, 2019
package.json chore(deps): bump dotenv from 7.0.0 to 8.0.0 Jul 22, 2019
yarn.lock chore(deps): bump dotenv from 7.0.0 to 8.0.0 Jul 22, 2019

README.md

dotenv (quasar-app-extension-dotenv)

official icon npm (scoped)

GitHub code size in bytes GitHub repo size in bytes npm

This project is an official Quasar v1 CLI App Extension for dotenv.

quasar-app-extension-dotenv is a CLI App Extension for Quasar Framework v1. It will not work with legacy versions of Quasar Framework.

This work is currently in beta and there are expected changes while things get worked out. Your help with testing is greatly appreciated.

Test Project

In demo folder of app-extension-dotenv.

Demo

Can be found here.

Install

To add this App Extension to your Quasar application, run the following (in your Quasar app folder):

quasar ext add @quasar/dotenv

Which will retrieve it from NPM and install it.

You will be asked a few questions. Type in your answers:

? What is the name of your .env that you will be using for development builds? .env.dev
? What is the name of your .env that you will be using for production builds? .env.prod
? What name would you like to use for your Common Root Object ('none' means to not use one)? none
? Create your .env files for you? Yes
? For security, would you like your .env files automatically added to .gitignore? Yes

Selecting [enter] on your keyboard will give you the defaults. The env file will be .env and there will be no common root object.

If you do not want your .env files created for you, say no. However, if the specified .env file already exists, it will NOT be overwritten. Note that if the files do not exist, then the build will fail.

Also, it is highly recommended to add your .env files to your .gitignore. They really do not belong in your repository as they may hold sensitive data.

Any data in a .env will be placed in process.env at the browser level.

If you specified a common root object, say MyData, then the data will be placed at process.env.MyData.

Be aware, if you have something like this in your .env:

APP_PORT=4000

Then you will need to use the parseInt() function as it will be propogated to the browser code as a string.

Uninstall

quasar ext remove @quasar/dotenv

Donate

If you appreciate the work that went into this App Extension, please consider donating to Quasar.

You can’t perform that action at this time.