0.1.8 • Published 10 years ago

gulp-es6-imports-renamer v0.1.8

Weekly downloads
1
License
MIT
Repository
github
Last release
10 years ago

gulp-es6-imports-renamer

Gulp plugin for es6-imports-renamer., which renames paths from es6 import declarations.

Usage

var gulp = require('gulp');
var rename = require('gulp-es6-imports-renamer');

gulp.task('rename', function() {
	gulp.src('src/*.js')
		.pipe(rename({renameFn: renameFn}))
		.pipe(gulp.dest('dist'));
});

Renaming dependencies with gulp can be very useful right before running a module transpiler:

var gulp = require('gulp');
var rename = require('gulp-es6-imports-renamer');
var transpile = require('gulp-es6-module-transpiler');

gulp.task('rename', function() {
	gulp.src('src/*.js')
		.pipe(rename({renameFn: renameFn}))
		.pipe(transpile({formatter: 'bundle'}))
		.pipe(gulp.dest('dist'));
});

That way you can build a bundle with all dependencies, including external ones (like jspm packages).

API

config

Accepts all config options accepted by es6-imports-renamer, except sources, as that is filled automatically by gulp-es6-imports-renamer from the files that are received through the stream.

0.1.8

10 years ago

0.1.7

10 years ago

0.1.6

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago