Giter Club home page Giter Club logo

app-extension-dotenv's Introduction

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

Patreon

If you like (and use) this App Extension, please consider becoming a Quasar Patreon.

app-extension-dotenv's People

Contributors

hawkeye64 avatar rstoenescu avatar mstaack avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.