# gulp-wrap-amd-infer

> Gulp plugin to automatically wrap and optionally compile files for testing AMD

Latest version **0.1.1** (published 2015-01-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-wrap-amd-infer
pnpm add gulp-wrap-amd-infer
yarn add gulp-wrap-amd-infer
bun add gulp-wrap-amd-infer
```

## 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.1 |
| Published | 2015-01-28 |
| First published | 2014-06-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.8.0 |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Kevin Malakoff |
| Maintainers | kmalakoff |
| Keywords | gulpplugin, wrap, amd, karma |

## Links

- npm: https://www.npmjs.com/package/gulp-wrap-amd-infer
- Repository: https://github.com/kmalakoff/gulp-wrap-amd-infer
- Issues: https://github.com/kmalakoff/gulp-wrap-amd-infer/issues
- npm.io page: https://npm.io/package/gulp-wrap-amd-infer

## Dependencies (4)

- [semver](https://npm.io/package/semver.md) *
- [underscore](https://npm.io/package/underscore.md) *
- [event-stream](https://npm.io/package/event-stream.md) *
- [coffee-script](https://npm.io/package/coffee-script.md) *

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 0.1.1 (latest) — 2015-01-28
- 0.1.0 — 2014-07-20
- 0.0.9 — 2014-07-13
- 0.0.8 — 2014-07-13
- 0.0.7 — 2014-06-29
- 0.0.6 — 2014-06-29
- 0.0.5 — 2014-06-29
- 0.0.4 — 2014-06-29
- 0.0.3 — 2014-06-28
- 0.0.2 — 2014-06-27
- 0.0.1 — 2014-06-27

## README

gulp-wrap-amd-infer
==================

Gulp plugin to automatically wrap and optionally compile files for testing AMD

```
gulp = require 'gulp'
wrapAMD = require 'gulp-wrap-amd-infer'

gulp.task 'build', ->
  gulp.src('test/some_test.coffee')
    .pipe(wrapAMD({
      path_files: [
        './node_modules/jquery/jquery.js'
        './node_modules/underscore/underscore.js'
        './node_modules/backbone/backbone.js'
      ]
      shims:
        underscore: {exports: '_'}
        backbone: {exports: 'Backbone', deps: ['underscore']}
      karma: true
    ))
    .pipe(gulp.dest('test/build'))
```

Output:

```
(function() {
  var _start = window.__karma__.start, _config; window.__karma__.start = function(config) { _config = config; };

  require.config({
  "paths": {
    "jquery": "/base/node_modules/jquery/jquery",
    "underscore": "/node_modules/underscore/underscore",
    "backbone": "/node_modules/backbone/backbone"
  },
  "shim": {
    "underscore": {
      "exports": "_"
    },
    "backbone": {
      "exports": "Backbone",
      "deps": [
        "underscore"
      ]
    }
  }
});

  require(["jquery","underscore","backbone"], function(){
    // test/some_test.coffee compiled to JavaScript

    _start(_config);
  });
}).call(this);
```

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