1.0.0 • Published 7 years ago
nativescript-app-environment v1.0.0
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-environmentUsage
Set production mode in tns run:
tns run android --env.app.prodThis will create
environment.jsonwith this content:{ prod: true }in app
const { environment } = require('./environment.json'); console.log(environment);Inspired by nativescript-hook-debug-production
1.0.0
7 years ago