Skip to content

Commit

Permalink
Merge pull request #2 from olisto/scope
Browse files Browse the repository at this point in the history
Change scope to @Triggi, gh action for automatic test+publish
  • Loading branch information
dreusel committed Mar 5, 2024
2 parents fa89f8b + dd53996 commit 5314af2
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 10 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# This workflow will lint, run tests and then publish a package to NPM when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Node.js test and publish

on:
push:
branches:
- master
pull_request:
branches:
- master
release:
types:
- published

jobs:
test-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
- name: check version against release tag
if: ${{ github.event_name == 'release' }}
uses: dreusel/match-tag-to-package-version@master
with:
TAG_PREFIX: v
- name: set NPM token
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
- name: install dependencies
run: npm install
- name: test
run: npm test
- name: publish
if: ${{ github.event_name == 'release' }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
run: npm publish
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,34 @@
# native-exec
# @triggi/native-exec

[![Build Status](https://travis-ci.org/OrKoN/native-exec.svg?branch=master)](https://travis-ci.org/OrKoN/native-exec)

Module that provides access to POSIX exec* functions.

This is a fork of https://github.com/OrKoN/native-exec
Inspired by: https://github.com/jprichardson/node-kexec

## Installation

requires a C++ compiler installed, most probably.

```sh
npm i native-exec
npm i @triggi/native-exec
```

## Usage

Replace the current process with another one:

```
var exec = require('native-exec');
var exec = require('@triggi/native-exec');
exec('ls'); // => the process is replaced with ls, which runs and exits
```

Replace the current process with another one and replace process' env:

```
var exec = require('native-exec');
var exec = require('@triggi/native-exec');
exec('ls', {
newEnvKey: newEnvValue,
Expand All @@ -37,7 +38,7 @@ exec('ls', {
Replace the current process with another one, replace process' env and provide arguments:

```
var exec = require('native-exec');
var exec = require('@triggi/native-exec');
exec('ls', {
newEnvKey: newEnvValue,
Expand All @@ -50,4 +51,4 @@ If you want to have a bootstrap script written in NodeJS you can use this module

## LICENSE

MIT
MIT
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "native-exec",
"name": "@triggi/native-exec",
"version": "0.3.0",
"description": "Module that provides access to POSIX exec* functions",
"keywords": [
Expand All @@ -16,11 +16,11 @@
"main": "index.js",
"author": "Oleksii Rudenko",
"bugs": {
"url": "http://github.com/OrKoN/native-exec/issues"
"url": "http://github.com/olisto/native-exec/issues"
},
"repository": {
"type": "git",
"url": "http://github.com/OrKoN/native-exec.git"
"url": "http://github.com/olisto/native-exec.git"
},
"dependencies": {
"bindings": "^1.5.0"
Expand Down

0 comments on commit 5314af2

Please sign in to comment.