move to @vscode/windows-mutex (#16)

This commit is contained in:
João Moreno 2023-03-16 11:53:48 +01:00 коммит произвёл GitHub
Родитель 53946fb605
Коммит 432d43ad40
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 14 добавлений и 10 удалений

Просмотреть файл

@ -1,24 +1,28 @@
# windows-mutex
[![Build Status](https://dev.azure.com/vscode/node-windows-mutex/_apis/build/status/microsoft.node-windows-mutex?branchName=master)](https://dev.azure.com/vscode/node-windows-mutex/_build/latest?definitionId=23&branchName=master)
[![Build Status](https://dev.azure.com/vscode/node-windows-mutex/_apis/build/status/microsoft.node-windows-mutex?branchName=main)](https://dev.azure.com/vscode/node-windows-mutex/_build/latest?definitionId=23&branchName=main)
[![Build Status](https://dev.azure.com/monacotools/Monaco/_apis/build/status/npm/windows-mutex?repoName=microsoft%2Fnode-windows-mutex&branchName=main)](https://dev.azure.com/monacotools/Monaco/_build/latest?definitionId=464&repoName=microsoft%2Fnode-windows-mutex&branchName=main)
[![npm version](https://badge.fury.io/js/@vscode/windows-mutex.svg)](https://badge.fury.io/js/@vscode/windows-mutex)
Expose the Windows CreateMutex API to Node.JS.
## Installation
`windows-mutex` will only compile in Windows machines, so it is advisable
`@vscode/windows-mutex` will only compile in Windows machines, so it is advisable
to use the `--save-optional` flag and wrap the
`require('windows-mutex')` call in a `try {} catch {}` block, in case your
`require('@vscode/windows-mutex')` call in a `try {} catch {}` block, in case your
code also runs on other platforms.
```
npm install --save-optional windows-mutex
npm install --save-optional @vscode/windows-mutex
```
## Usage
```javascript
import { Mutex } from 'windows-mutex';
import { Mutex } from '@vscode/windows-mutex';
var mutex = new Mutex('my-mutex');
console.log(mutex.isActive());

Просмотреть файл

@ -1,13 +1,13 @@
{
"name": "windows-mutex",
"name": "@vscode/windows-mutex",
"version": "0.4.2",
"description": "Expose the Windows CreateMutex API to Node.JS",
"main": "index.js",
"homepage": "https://github.com/Microsoft/node-windows-mutex",
"bugs": "https://github.com/Microsoft/node-windows-mutex/issues",
"homepage": "https://github.com/microsoft/node-windows-mutex",
"bugs": "https://github.com/microsoft/node-windows-mutex/issues",
"repository": {
"type": "git",
"url": "https://github.com/Microsoft/node-windows-mutex.git"
"url": "https://github.com/microsoft/node-windows-mutex.git"
},
"author": "Microsoft",
"license": "MIT",
@ -24,4 +24,4 @@
"scripts": {
"test": "mocha"
}
}
}