# laravel-elixir-rjs

> Optimize your main file with Laravel Elixir

Latest version **1.0.1** (published 2015-08-14) · MIT license · 0 weekly downloads

## Install

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

## 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.1 |
| Published | 2015-08-14 |
| First published | 2015-08-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Gerardo Gómez |
| Maintainers | ruysu |
| Keywords | laravel, elixir, requirejs, rjs, laravel-elixir-requirejs, laravel-elixir-rjs |

## Links

- npm: https://www.npmjs.com/package/laravel-elixir-rjs
- Repository: https://github.com/ruysu/laravel-elixir-rjs
- Issues: https://github.com/ruysu/laravel-elixir-rjs/issues
- npm.io page: https://npm.io/package/laravel-elixir-rjs

## Dependencies (5)

- [gulp](https://npm.io/package/gulp.md) ^3.8.8
- [lodash](https://npm.io/package/lodash.md) ^3.10.1
- [through2](https://npm.io/package/through2.md) ^2.0.0
- [gulp-util](https://npm.io/package/gulp-util.md) ^3.0.6
- [requirejs](https://npm.io/package/requirejs.md) ^2.1.20

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.1 (latest) — 2015-08-14
- 1.0.0 — 2015-08-14

## README

# Laravel Elixir requirejs optimization

Optimize your main requirejs file with Laravel Elixir.

## Installation

First you need to install this package.

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

Then require this package into your `gulpfile.js`.

```js
var Elixir = require('laravel-elixir');
require('laravel-elixir-rjs');
```

Then call the `rjs` method from your mix.

The `rjs` method can take up to four arguments:

  1. `main` (optional): The main file to optimize (defaults to `main.js`).
  3. `baseDir` (optional): The folder in which your js files are stored (defaults to `resources/assets/js`).
  2. `outputPath` (optional): The output folder (defaults to `public/js`).
  4. `options` (optional):  Options object passed to the `r.js` command.

This task defines a watcher for the path defined in `options.watchPath`.

Sample code:

```js
Elixir(function(mix) {
    mix.rjs('main.js', 'resources/assets/js', 'public/js', {
        include: ['underscore', 'jquery', 'moment', 'requirejs'],
        insertRequire: ['main'],
        watchPath: ['app/**/*.js', 'main.js']
    });
});
```

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