# gatsby-transformer-ms-word

> Gatsby transformer plugin for MS Word files

Latest version **1.1.0** (published 2019-08-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install gatsby-transformer-ms-word
pnpm add gatsby-transformer-ms-word
yarn add gatsby-transformer-ms-word
bun add gatsby-transformer-ms-word
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2019-08-13 |
| First published | 2019-08-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8.0.0 |
| Dependencies | 3 |
| Unpacked size | 3.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Abhi Yerra |
| Maintainers | abhiyerra |
| Keywords | gatsby, gatsby-plugin, ms-word |

## Links

- npm: https://www.npmjs.com/package/gatsby-transformer-ms-word
- Repository: https://github.com/abhiyerra/gatsby-transformer-ms-word
- Homepage: https://github.com/abhiyerra/gatsby-transformer-ms-world#readme
- Issues: https://github.com/gatsbyjs/gatsby/issues
- npm.io page: https://npm.io/package/gatsby-transformer-ms-word

## Dependencies (3)

- [mammoth](https://npm.io/package/mammoth.md) ^1.4.8
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.0.0
- [office-document-properties](https://npm.io/package/office-document-properties.md) ^1.0.8

## Recent versions

- 1.1.0 (latest) — 2019-08-13
- 1.0.0 — 2019-08-01

## README

# gatsby-transformer-ms-word

Use [mammoth](https://github.com/mwilliamson/mammoth.js) to extract textual content of MS Word files.

## Install

`npm install --save gatsby-transformer-ms-word`

You also need to have gatsby-source-filesystem installed and configured so it points to your files.

## How to use

```javascript
// In your gatsby-config.js
module.exports = {
  plugins: [
    {
      resolve: `gatsby-source-filesystem`,
      options: {
        name: `data`,
        path: `${__dirname}/src/data/`
      }
    },
    `gatsby-transformer-ms-word`
  ]
};
```

Then you'll be able to query the textual content of your pdfs files like:

```javascript
{
  allDocx {
    edges {
      node {
        content
      }
    }
  }
}
```

Which would return:

```javascript
{
  "data": {
    "allDocx": {
      "edges": [
        {
          "node": {
            "content": "1 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vel purus id tortor \r\neleifend vulputate. Integer interdum ultricies ligula, nec mattis lorem viverra ac. \r\n"
          }
        }
      ]
    }
  }
}
```

---
_Source: https://npm.io/package/gatsby-transformer-ms-word · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
