gulp-jsrefs
js debug/develop refs replacement plugin for gulp.
Last updated 5 years ago by rehorn .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install gulp-jsrefs 
SYNC missed versions from official npm registry.

gulp-jsrefs

js debug/develop refs replacement plugin for gulp.

usage

var dist = './dist';
// replace html js contact to seprate script inline for debug/develop
gulp.task('jsrefs', function() {
    var refOpt = {
        urlPrefix: '../',
        mapping: [{
            target: 'js/concat.js',
            inclue: [{
                'src/js/common.js',
                'src/js/index.js',
            }]
        }]
    };

    return gulp.src(dist + '*.html')
        .pipe(jsrefs(refOpt))
        .pipe(gulp.dest(dist));
});

src/index.html

<html>
<script type="text/javascript" src="js/tab.js"></script>
</html>

after gulp, dist/index.html, for debug & develop purpose

<html>
<script type="text/javascript" src="../src/js/common.js"></script>
<script type="text/javascript" src="../src/js/index.js"></script>
</html>

Current Tags

  • 0.1.1                                ...           latest (5 years ago)

2 Versions

  • 0.1.1                                ...           5 years ago
  • 0.0.1                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 2
Dependencies (2)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |