node-uwp

Enables Universal Windows Platform (UWP) API access for Node.js (Chakra build) on Windows 10.

  • 所有者: microsoft/node-uwp
  • 平台:
  • 许可证: MIT License
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

node-uwp

Enables Universal Windows Platform (UWP) API access for Node.js (Chakra build)
on Windows 10.

Example

const uwp = require('uwp');
const Windows = uwp.projectNamespace('Windows');

Windows.Storage.KnownFolders.documentsLibrary.createFileAsync(
  'sample.dat', Windows.Storage.CreationCollisionOption.replaceExisting)
  .done(
    function (file) {
      console.log('ok');
      uwp.close(); // all async operations are completed, release uwp
    },
    function (error) {
      console.error('error', error);
      uwp.close(); // all async operations are completed, release uwp
    }
);

Installation

Prerequisites

Run under Node.js (Chakra) command prompt:

npm install uwp

APIs

This package exports 2 functions.

projectNamespace(name)

Project a UWP namespace of given name.

  • Note: This function will keep Node process alive so that your app can
    continue to run and handle UWP async callbacks. You need to call
    close() when UWP usage is completed.

close()

Close all UWP handles used by this package. Call this when all UWP usage is
completed.


Checkout our OSS effort with
Node-ChakraCore. It supports the
most recent version of node.js and will also be useful if you are on Windows 7
or Windows 8.1. Note: It does not support UWP.

主要指标

概览
名称与所有者microsoft/node-uwp
主编程语言C++
编程语言C++ (语言数: 3)
平台
许可证MIT License
所有者活动
创建于2015-05-06 17:44:15
推送于2023-06-27 13:09:25
最后一次提交2023-06-27 13:09:24
发布数3
最新版本名称v1.0.2 (发布于 2016-09-29 14:51:44)
第一版名称1.0.0 (发布于 )
用户参与
星数152
关注者数68
派生数26
提交数15
已启用问题?
问题数26
打开的问题数13
拉请求数8
打开的拉请求数0
关闭的拉请求数1
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?