gulp plugin that converts commonjs to AMD
based on gulp-es6-to-amd
Installation
npm install gulp-common-to-amd --save
Usage
Convert files with:
const gulp = require('gulp');
const commonToAmd = require('gulp-common-to-amd');
module.exports = function (options) {
return gulp.src(options.src)
.pipe(commonToAmd())
.pipe(gulp.dest(options.dest));
};
Example:
commonjs
var lib = require("./lib");
module.exports = {lib: lib};
AMD
;