Skip to content

Wiredep appears to be adding a repeating a copy of the markup at the bottom of index.html #268

@mtpultz

Description

@mtpultz

Running wiredep using gulp-wiredep seems to be replicating the bottom tags of index file. This occurs on each run of wiredep, but if we comment out the wiredep task it doesn't occur.

gulp.task('inject-vendors', [], function () {

    helpers.log('Inject Vendors');

    var masterFile = path.join(config.viewPath, config.master);
    var options = {
        bowerJson: require('./../bower'),
        directory: vendorPath,
        ignorePath: '../../public',
        exclude: wireDepExclusions
    };

    return gulp.src(masterFile)
               .pipe($.plumber())
               .pipe(wireDep(options)) // <--- commenting this out stops the issue
               .pipe(gulp.dest(config.viewPath));
});

File BEFORE running the inject-vendors task:

<!-- Vendor Scripts -->
<!-- build:js /build/js/app.js -->
<!-- bower:js -->
<script src="/vendors/angular/angular.js"></script>
<!-- endbower -->

<!-- Application Scripts -->
<!-- inject:js -->
<script src="/js/app.js"></script>
<!-- endinject -->

<!-- Application Templates -->
<!-- inject:templates:js -->
<script src="/js/app.templates.js"></script>
<!-- endinject -->
<!-- endbuild -->

@include('init')

</body>
</html>

File AFTER running the inject-vendors task:

<!-- Vendor Scripts -->
<!-- build:js /build/js/app.js -->
<!-- bower:js -->
<script src="/vendors/angular/angular.js"></script>
<!-- endbower -->

<!-- Application Scripts -->
<!-- inject:js -->
<script src="/js/app.js"></script>
<!-- endinject -->

<!-- Application Templates -->
<!-- inject:templates:js -->
<script src="/js/app.templates.js"></script>
<!-- endinject -->
<!-- endbuild -->

@include('init')

</body>
</html>
-- endbuild -->

@include('init')

</body>
</html>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions