Skip to content

File ordering is not correct (random issue) #29

@mikehuebner

Description

@mikehuebner

This was just working, I just updated to 1.1.1 from 1.0.4 and now my files are not ordering correctly.

Here is the inject code I'm using, any help would be awesome. Can't tell if I'm missing something or not.

gulp.task('version', function () {
    console.log("Automatically injecting JS & CSS...");
    return gulp.src('./src/index.html')
        .pipe($.inject(
            gulp.src(paths.javascript.prod)
            .pipe($.angularFilesort()), {
                addRootSlash: true, // ensures proper relative paths
                ignorePath: '/dist/app-v' + node.version + '/', // ensures proper relative paths
                transform: function (filePath, file) {
                    return '<script type="text/javascript" src="' + filePath + '"></script>';
                }
            }))
        .pipe($.inject(gulp.src(paths.sass.prod), {
            addRootSlash: true, // ensures proper relative paths
            ignorePath: '/dist/app-v' + node.version + '/', // ensures proper relative paths
            transform: function (filePath, file) {
                return '<link href="' + filePath + '" rel="stylesheet" type="text/css">';
            }
        }))
        .pipe($.angularHtmlify({
            customPrefixes: ['ui-']
        }))
        .pipe($.minifyHtml({
            comments: false,
            spare: true
        }))
        .pipe(gulp.dest('./dist/app-v' + node.version));
});

This returns the file order of:

app-v.js (actual app)
foundation-v.js (angular and what not)
ext-v.js (extended libs)

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