nativescript-starter-kits

NativeScript Cli Extension
授权协议 Apache-2.0 License
开发语言 TypeScript
所属分类 应用工具、 终端/远程登录
软件类型 开源软件
地区 不详
投 递 者 焦驰
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

nativescript-starter-kits

A NativeScript CLI extension for managing templates

Automatic Installation

You can install this extension using the Nativescript CLI

$ tns extension install nativescript-starter-kits

Manual Installation and Development

Download the GIT repository in you favorite projects directory

$ git clone git@github.com:NativeScript/nativescript-starter-kits.git

Run the following commands to install all dependencies, transpile all Ts files and to pack the extension.

$ npm i --ignore-scripts
$ npm i -g grunt-cli (only in case you do not have it installed globally)

$ grunt
$ grunt pack

These commands will create a .tgz file in the extension folder

Install the npm package

$ tns extension install <path to nativescript-starter-kits>.tgz

Public API

Get proper nativescript reference

const pathToPackage = require("global-modules-path").getPath("nativescript", "tns");
const tns = require(pathToPackage);

Load all available extensions

/**
     * @name loadExtensions
     * @description Loads all currently installed extensions
     * @return {Promise<any>[]} - On Success: Array of Promises, one for each installed extension
*/
Promise.all(tns.extensibilityService.loadExtensions()).then((loadedExtensions) => {
    console.log("All extensions loaded successfully!");
}).catch((error) => {
    console.error(error);
});
Get details for all installed templates
/**
     * @name getTemplates
     * @description List all available templates
     * @return {Promise<Array<any>>} - On Success: Array of Objects with Details about each template
*/
tns.templateService.getTemplates().then((templates) => {
    console.log(templates);
}).catch((error) => {
    console.error(error);
});
Get details for a single App template
/**
     * @name getAppTemplateDetails
     * @description The method returns details about a single app template.
     * @param {string} templateName - The name of the template
     * @returns {Promise<any>} - Object with details about the app template
     */
    getAppTemplateDetails(templateName: string): any;
    
tns.templateService.getAppTemplateDetails("templateName").then((details) => {
    console.log(details);
}).catch((error) => {
    console.error(error);
});

Run tests

Before running the test you need to transpile all files and dependencies.

$ grunt pack
$ npm run test

Issues

If you have found an issue with this extension, please report the problem in the Issues section.

 相关资料
  • NS Vue Typescript Sample A native mobile application built with NativeScript-Vue in Typescript Technologies NativeScript A cross-platform Javascript platform that allows writing native (not hybrid) mo

  • Nativescript Angular Web Starter A simple starter project to create native mobile and web apps with single shared code base using angular and nativescript. Check this Open Souce Cross Platform Quotes

  • Graphile Starter Take it for a spin! We're running the starter at: https://graphile-starter.herokuapp.com Feel free to register an account and have a poke around as you see fit. NOTE: emails are sent

  • NativeScript 可以使用 Javascript,CSS, XML 创建真正的 Native 跨平台应用,支持 iOS Android,NativeScript 将您的跨平台代码翻译成目标平台的代码。 UI 使用 XML 描述,CSS 样式,在编译时将 UI 转化成本地原生代码,最终得到正在的 Native 原生应用。 Telerik 公开了用于创建安卓、iOS和Windows Unive

  • 在本章中,我们将学习如何创建一个基于Thymeleaf的示例项目来演示Spring CLI的功能。 按照下面提到的步骤创建一个示例项目 - Sr.No 步骤和说明 1 使用子文件夹templates和static创建名为TestApplication的文件夹。 2 在TestApplication文件夹中创建message.groovy ,在templates文件夹中创建message.groov

  • BeeCP-Starter是小蜜蜂连接池在Springboot上的启动器 相关功能 1:文件方式配置数据源信息 2:支持一个或多数据源配置 3:支持配置Jndi数据源 4:扩展支持其他数据源 5: 连接池监控 运行依赖 1:Java版本:JDK1.8 2:Springboot版本:2.0.9.RELEASE 版本下载 <dependency> <groupId>com.github.chris