1.6.2 • Published 4 years ago

@buxlabs/gulp-es6-to-amd v1.6.2

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

ES to AMD converter

npm

ES (EcmaScript) Module to AMD (Asynchronous Module Definition) converter

Table of Contents

Background

This gulp plugin uses an ES to AMD converter for ES -> AMD conversion. It can be helpful during code migrations where you need to have a temporary backwards compatibility.

Install

npm install @buxlabs/gulp-es6-to-amd

Usage

Convert files with:

const gulp = require('gulp')
const es6toamd = require('@buxlabs/gulp-es6-to-amd')

module.exports = ({ src, dest }) => {
  return gulp.src(src)
    .pipe(es6toamd())
    .pipe(gulp.dest(dest))
}

Examples

ES

import Backbone from 'backbone';

export default Backbone.Model.extend({});

AMD

define(['backbone'], function (Backbone) {
    'use strict';
    return Backbone.Model.extend({});
});

Maintainers

@emilos.

Contributing

All contributions are highly appreciated! Open an issue or a submit PR.

License

MIT © buxlabs

1.6.2

4 years ago

1.6.1

4 years ago

1.6.0

4 years ago

1.5.0

5 years ago

1.4.0

7 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago