# webpack-append

> Simple loader to append text to files (useful for adding file headers)

Latest version **0.1.2** (published 2016-03-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install webpack-append
pnpm add webpack-append
yarn add webpack-append
bun add webpack-append
```

## 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.1.2 |
| Published | 2016-03-09 |
| First published | 2016-01-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | dumconstantin |
| Keywords | webpack, loader, webpack-loader, append, string-append, header |

## Links

- npm: https://www.npmjs.com/package/webpack-append
- Repository: https://github.com/dumconstantin/webpack-append
- Issues: https://github.com/dumconstantin/webpack-append/issues
- npm.io page: https://npm.io/package/webpack-append

## Alternatives

- [@mce/gif](https://npm.io/package/@mce/gif.md) — 2.6K weekly downloads
- [cleanse](https://npm.io/package/cleanse.md) — 173 weekly downloads
- [str](https://npm.io/package/str.md) — 127 weekly downloads
- [naming](https://npm.io/package/naming.md) — 95 weekly downloads
- [tap-telco-api](https://npm.io/package/tap-telco-api.md) — 19 weekly downloads

## Recent versions

- 0.1.2 (latest) — 2016-03-09
- 0.1.1 — 2016-02-29
- 0.1.0 — 2016-02-19
- 0.0.6 — 2016-01-20
- 0.0.5 — 2016-01-20
- 0.0.4 — 2016-01-20
- 0.0.3 — 2016-01-20
- 0.0.1 — 2016-01-20

## README

# [Webpack](http://webpack.github.io/) loader to append text to files

Append a header to the contents loaded by the loader. Useful to add headers to all your files in the webpack pipeline.

*Motivation*: I wanted to use Ramda functions directly in my application without import every single one causing a huge bloat in my import statements.
I also didn't want to keep using the "R." prefix.

## Install:

```bash
$ npm install --save-dev webpack-append
```

## Usage:

Add the loader to your `webpack.config.js`:

```javascript
module.exports = {
    // ...
    module: {
      loaders: [
        // ...
        {
          test: /\.js$/,
          loader: 'webpack-append',
          query: 'console.log(\'This header sits perfectly at the begining of my file.!\')'
        }
      ]
    }
}
```

## My use case:

```javascript
import R from 'ramda'
const importAllRamdaFunctions = 'import { ' + Object.keys(R).join(', ') + ' } from \'ramda\''

module.exports = {
    // ...
    module: {
      loaders: [
        // ...
        {
          test: /\.js$/,
          loader: 'webpack-append',
          query: importAllRamdaFunctions
        }
      ]
    }
}
```

## Contributing:

Feel free to open issues to propose stuff and participate. Pull requests are also welcome.

## Licence:

[MIT](http://en.wikipedia.org/wiki/MIT_License)

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