How to use the nativescript.nsStarterKitsApplicationService 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
const pageAction = () => {
    const args = process.argv.slice(2, 6);
    let appFlavor = '';
    try {
        appFlavor = checkFlavor(args[2]);
    } catch(error) {
        console.error(error);
    }
    
    const newPageName = args[0];
    const options = {
        displayName: args[1],
        templateFlavor: appFlavor
    }
    const appPath = args[3];
    tns.nsStarterKitsApplicationService.addPage(newPageName, options, appPath, "next")
    .then(function(details){
        console.log('Details=== ', details)
    })
    .catch(function(err){
        console.error('Error=== ', err)
    })
};

nativescript

Command-line interface for building NativeScript projects

Apache-2.0
Latest version published 22 days ago

Package Health Score

84 / 100
Full package analysis