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?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?