Skip to content
Detect in nativescript app release (production) or debug (development) mode
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.
lib
.gitignore
README.md
package.json
postinstall.js
preuninstall.js

README.md

nativescript-10hook-release-info

Add release info to the app

Detect app in release (production) mode or not

Install

tns plugin add nativescript-10hook-release-info

Usage

  • build or prepare app

    • will create release-info.json in app directory
    • example
    {
        "NODE_ENV": "development",
        "release": false
    }
    
  • in app

    const { release } = require('./release-info.json');
    
    console.log(release ? 'Production mode' : 'Debug mode');
    
  • Inspired by nativescript-hook-debug-production

You can’t perform that action at this time.