# for-node-webkit

> Find out if your module or directory is contained in a node-webkit project

Latest version **0.0.2** (published 2015-01-13) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install for-node-webkit
pnpm add for-node-webkit
yarn add for-node-webkit
bun add for-node-webkit
```

Provides the commands `fnw`, `forNodeWebkit`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2015-01-13 |
| First published | 2015-01-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Maximiliano Korp |
| Maintainers | maxkorp |

## Links

- npm: https://www.npmjs.com/package/for-node-webkit
- Repository: http://github.com/maxkorp/forNodeWebkit
- Homepage: https://github.com/maxkorp/forNodeWebkit
- Issues: https://github.com/maxkorp/forNodeWebkit/issues
- npm.io page: https://npm.io/package/for-node-webkit

## Dependencies (2)

- [find-parent-dir](https://npm.io/package/find-parent-dir.md) ^0.3.0
- [nodegit-promise](https://npm.io/package/nodegit-promise.md) ^1.0.0

## Recent versions

- 0.0.2 (latest) — 2015-01-13
- 0.0.1 — 2015-01-13

## README

for-node-webkit
=============

or-node-webkit is a tool for detecting if a given directory or package is
contained within a node-webkit project, particularly useful for build time
applications in native modules, where `nw-gyp` must be used instead of `node-gyp`.
It works by finding the root most package.json from the specified directory, and checking it's `engines` property for a `node-webkit` property.

##Commandline usage:
specify the directory to check against (or-node-webkit will search it's immediate parent and up), or if unspecified, it defaults to the current working directory.
```
forNodeWebkit "./mydir/someprojectiwanttoknowabout"
forNodeWebkit
```

The application automatically aliases fnw as well
```
fnw "./mydir/someprojectiwanttoknowabout"
fnw
```

##Module usage:
The module returns a function that returns a promise, resolving with
2 properties, root and nwVersion.

To find out if the current module resides in a node webkit project:
```
  var fnw = require('for-node-webkit');
  fnw(__dirname).then(function(results) {
    if (!results.root) {
      // Couldnt find a parent module
    }
    else if (!results.nwVersion) {
      // Root module doesnt use node webkit
    }
    else {
      // nwVersion is the version of node webkit
    }
  });
```

---
_Source: https://npm.io/package/for-node-webkit · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
