1.0.1 • Published 6 years ago

gulp-jspre v1.0.1

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

gulp-jspre

A JavaScript preprocessor for gulp to import local and remote scripts without using a bundler.

Gulp Usage

const jspre = require('gulp-jspre');

gulp.task('js', () => {
  return gulp.src('entrypoint.js')
    .pipe(jspre())
    .pipe(gulp.dest('./dist/'));
});

entrypoint.js

(function() {
  console.log('this is my javascript file!');
})();

// import from another file on disk
// @jspre "another-file.js"

// import from a file on the web
// @jspre "http://code.jquery.com/jquery-3.3.1.js"