# @parkhub/create-proto-files-paths-map

> Create Proto Files Paths Map ===================

Latest version **0.2.0** (published 2017-06-23) · 0 weekly downloads

## Install

```sh
npm install @parkhub/create-proto-files-paths-map
pnpm add @parkhub/create-proto-files-paths-map
yarn add @parkhub/create-proto-files-paths-map
bun add @parkhub/create-proto-files-paths-map
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2017-06-23 |
| First published | 2017-06-23 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8.0.0 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | bfletcherbiggs, ggellene, jonsenterfitt, loganbfisher, realtschoegl, sirmyztiq, thetwosents |

## Links

- npm: https://www.npmjs.com/package/@parkhub/create-proto-files-paths-map
- npm.io page: https://npm.io/package/@parkhub/create-proto-files-paths-map

## Dependencies (1)

- [@parkhub/proto-finder](https://npm.io/package/@parkhub/proto-finder.md) ^0.1.0

## Recent versions

- 0.2.0 (latest) — 2017-06-23
- 0.1.0 — 2017-06-23

## README

Create Proto Files Paths Map
===================

Get the full path of protofiles in the nearest ```protos/``` directory in the form of a map keyed by a custom tag of your choosing. Full paths are used by [grpc](https://www.npmjs.com/package/grpc)


Install
-------------

```(shell)
npm install @parkhub/create-proto-files-paths-map
```


Use
-------------
Sample project directory:
```
project
└───protos
│   │   proto_file_one.proto
│   │   proto_file_two.proto
└───src
    │   index.js
```

```javascript

 // index.js
import createProtoFilesPathsMap from '@parkhub/create-proto-files-paths-map';

const protoFiles = [{
  tag: 'myTag',
  fileName: 'proto_file_one'
}, {
  tag: 'mySecondTag',
  fileName: 'proto_file_two'
}];

createProtoFileMap(protoFiles)
  .then(protoFilesMap => {
    /*
      protoFilesMap is a map with the following properties:
        {
          myTag: /system/path/project/protos/proto_file_one.proto,
          mySecondTag: /system/path/project/protos/proto_file_two.proto,
        }
    */

    const fileOnePath = protoFilesMap.get('myTag');
    const fileTwoPath = protoFilesMap.get('mySecondTag');
  });
```

---
_Source: https://npm.io/package/@parkhub/create-proto-files-paths-map · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
