Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing reference to the file #192

Open
cmarrero01 opened this issue Apr 12, 2017 · 0 comments
Open

Missing reference to the file #192

cmarrero01 opened this issue Apr 12, 2017 · 0 comments

Comments

@cmarrero01
Copy link

cmarrero01 commented Apr 12, 2017

Hi,

I have been working for a long time with gulp-usemin, but know, I have a extrange error.

I change the extesion of my file from html to .mustache file, and so, I change the gulp-min task in order to take the mustache file, but surprise don't put the reference of compiled files inside of the mustache file.

for example..

This is the footer.mustache file.

<!-- build:components /lib/lib.js -->
<script type="text/javascript" src="/js/utils/jquery.min.js"></script>
<script type="text/javascript" src="/bower_components/moment/min/moment-with-locales.min.js"></script>
<script type="text/javascript" src="/bower_components/moment-range/dist/moment-range.min.js"></script>
<script type="text/javascript" src="/bower_components/angular/angular.js"></script>
<script type="text/javascript" src="/bower_components/angular-cookies/angular-cookies.min.js"></script>
<script type="text/javascript" src="/bower_components/angular-sanitize/angular-sanitize.min.js"></script>
<script type="text/javascript" src="/bower_components/angular-animate/angular-animate.min.js"></script>
<script type="text/javascript" src="/bower_components/angular-touch/angular-touch.min.js"></script>
<script type="text/javascript" src="/bower_components/angular-carousel/dist/angular-carousel.min.js"></script>
<script type="text/javascript" src="/js/utils/angular-locale_es-es.js"></script>
<script type="text/javascript" src="/js/utils/underscore-min.js"></script>
<script type="text/javascript" src="/js/utils/moment.min.js"></script>
<!-- endbuild -->

The gulp task is:

gulp.task('usemin', ['clean'], function() {
    var stream = gulp.src(config[options.proj].src + '/*.mustache')
        .pipe(usemin({
            css: [rev],
            components: [rev],
            js: [uglify(uglifyOptions),rev],
            skipMissingResources: true
        }))
        .pipe(gulp.dest(config[options.proj].dest));
    return stream;
});

This create the file lib/lib.js correctly but not change the footer.mustache file with the new reference to that file.

I try to look up the node_modules files for usemin but I don't find any "hardcoded" html extension.

Any help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant