0.1.8 • Published 9 years ago

gulp-importjs v0.1.8

Weekly downloads
301
License
-
Repository
github
Last release
9 years ago

gulp-importjs

Gulp plugin for allowing imports in JS files using the @import syntax. Each import MUST be on it's own line. If a script has already been imported on the page, it will not import again. Imports are recursive.

##Usage Create a new js file with a .jsrc extension.

@import "/path/to/file.js";

In your gulpfile.js...

var gulp     = require('gulp');
var importjs = require('gulp-importjs');
var rename   = require('gulp-rename');

gulp.task('importjs', function() {
  return gulp.src(['folder/to/run/importjs/on'])
    .pipe(importjs())
    .pipe(rename({extname: '.js'}))
    .pipe(gulp.dest('folder/to/save/to'));
});

gulp.task('default', ['importjs']);
0.1.8

9 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