gulp-require-convert
CommonJS module to AMD converter plugin for gulp
Overview
Require-convert will convert CommonJs files that look like this:
var foo = ;moduleexports = foo;
and wrap them in a basic AMD define like this:
;
This plugin uses the RequireJS Optimizer's internal convert function for converting modules. This function will only wrap your file in a define call if it does not already have a define call AND if it appears to be a CommonJS module.
Usage
First, install gulp-require-convert
as a development dependency:
npm install --save-dev gulp-require-convert
Then, add it to your gulpfile.js
:
var requireConvert = ; gulp ;