node-uwp

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

  • Owner: microsoft/node-uwp
  • Platform:
  • License:: MIT License
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

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.

Overview

Name With Ownermicrosoft/node-uwp
Primary LanguageC++
Program languageC++ (Language Count: 3)
Platform
License:MIT License
Release Count3
Last Release Namev1.0.2 (Posted on 2016-09-29 14:51:44)
First Release Name1.0.0 (Posted on )
Created At2015-05-06 17:44:15
Pushed At2023-06-27 13:09:25
Last Commit At2023-06-27 13:09:24
Stargazers Count151
Watchers Count69
Fork Count32
Commits Count15
Has Issues Enabled
Issues Count26
Issue Open Count13
Pull Requests Count8
Pull Requests Open Count0
Pull Requests Close Count1
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private
To the top