How to use the nativescript.settingsService function in nativescript

To help you get started, we’ve selected a few nativescript examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NativeScript / nativescript-cli-tests / tests / page_templates / add.js View on Github external
'use strict';

const path = require("path");
const tns = require("nativescript");
tns.settingsService.setSettings({ profileDir: path.join(__dirname, "..", "..") });

const checkFlavor = (flavor) => {
    if (typeof flavor !== "string") {
        return new Error("Flavor fust be string");
    }
    const isAngular= flavor.indexOf("ng") > -1;
    const isTypeScript = flavor.indexOf("ts") > -1;
    const isJs = flavor.indexOf("js") > -1;

    if (isAngular) {
        flavor = "Angular & TypeScript";
        console.log("Flavor === ", flavor);
    } else if (isTypeScript) {
        flavor = "TypeScript";
        console.log("Flavor === ", flavor);
    } else if (isJs) {

nativescript

Command-line interface for building NativeScript projects

Apache-2.0
Latest version published 2 months ago

Package Health Score

82 / 100
Full package analysis