Skip to content
No description or website provided.
TypeScript JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
.npmignore
README.md
package-lock.json
package.json
postinstall.js
preuninstall.js
tsconfig.json

README.md

nativescript-app-environment

Add environment variables into your app from the nativescript-cli

Creates app/environment.json from the nativescript-cli command via argv --env.app

Install

tns plugin add nativescript-app-environment

Usage

  • Set production mode in tns run:

      tns run android --env.app.prod

    This will create environment.json with this content:

    { prod: true }
  • in app

    const { environment } = require('./environment.json');
    
    console.log(environment);
  • Inspired by nativescript-hook-debug-production

You can’t perform that action at this time.