src-import

0.0.6 • Public • Published

src-import

srcImport srcImport

source combine for gulp

example

Normal

gulp.task('src-import', function () {
  gulp.src(['devFile.js'])
    .pipe(imports())
    .pipe(gulp.dest('./dest'));
});

devFile.js

imports('./test1.js');
var b = function () {
  console.log('Hello src-import');
};

or

devFile2.js

var test1 = imports('./test1.js');
var b = function () {
  console.log('Hello src-import');
};

options

  • opt.keyword

    default:imports

  • opt.encoding

    default: 'utf-8'

  • opt.smart

    default: true, Set true to let var a = imports('./b'); available.

  • opt.basedir

    basedir for combine.

changelog V0.0.6

  • Gather temporary handler for smart;

Package Sidebar

Install

npm i src-import

Weekly Downloads

1

Version

0.0.6

License

none

Last publish

Collaborators

  • bottleliu