# laravel-elixir-replace2

> A gulp-replace wrapper for Laravel Elixir.

Latest version **1.0.2** (published 2016-11-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install laravel-elixir-replace2
pnpm add laravel-elixir-replace2
yarn add laravel-elixir-replace2
bun add laravel-elixir-replace2
```

## 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.0.2 |
| Published | 2016-11-16 |
| First published | 2016-09-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Elf Sundae |
| Maintainers | elfsundae |
| Keywords | laravel, elixir, replace |

## Links

- npm: https://www.npmjs.com/package/laravel-elixir-replace2
- Repository: https://github.com/ElfSundae/laravel-elixir-replace
- Homepage: https://github.com/ElfSundae/laravel-elixir-replace#readme
- Issues: https://github.com/ElfSundae/laravel-elixir-replace/issues
- npm.io page: https://npm.io/package/laravel-elixir-replace2

## Dependencies (1)

- [gulp-replace](https://npm.io/package/gulp-replace.md) ^0.5.4

## Recent versions

- 1.0.2 (latest) — 2016-11-16
- 1.0.1 — 2016-09-28
- 1.0.0 — 2016-09-28

## README

# laravel-elixir-replace2

A [gulp-replace][] wrapper for [Laravel Elixir][elixir] 6 or higher.

## Installation

```sh
npm install --save-dev laravel-elixir-replace2
```

## Usage

```js
const elixir = require('laravel-elixir');

require('laravel-elixir-replace2');

elixir(mix => {
    mix.replace('node_modules/foo/bar.css', '../images/', '../img/', 'build');
});
```

The above example will replace all `'../images/'` in file `node_modules/foo/bar.css` to `'../img/'` and then save the processed file to `build/bar.css`.

## API

> **replace(src, search, replacement[, output[, options]])**

**Note:** `src` and `output` are relative to the project's root directory.

- **src**
  `string|array` The source files or directories.
- **search**
  `string|RegExp` The string or regex pattern to search for.
- **replacement**
  `string|function` The replacement string or function.
- **output**
  `string` (Optional) The output file or directory. Default is the same as the `src`.
- **options**
  `object` (Optional) The options for [gulp-replace][]. You can access the global options with `elixir.config.replace`.
  Default options is:
  ```js
  { 
    skipBinary: true
  }
  ```

[elixir]: http://laraveldoc.com/docs/elixir
[gulp-replace]: https://www.npmjs.com/package/gulp-replace

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