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

Unable to minify scripts #160

Open
James-ZHANG opened this issue Jan 24, 2016 · 1 comment
Open

Unable to minify scripts #160

James-ZHANG opened this issue Jan 24, 2016 · 1 comment

Comments

@James-ZHANG
Copy link

For some reason, usemin fails to output any minified js files and the output html contains no script tag as well. It works for css minification, however...
I've followed the doc and checked my gulpfile.js quite a few times and it shouldn't contain any trivial errors.
Below is my block in html:

<!-- build:js scripts/main.js -->
    <script src="../bower_components/angular/angular.min.js">
    </script>
    <script src="scripts/app.js">
    </script>
<!-- endbuild -->

, and my gulp task:

gulp.task('usemin', ['jshint'], function() {
    return gulp.src('./app/menu.html')
        .pipe(usemin({
                    css: [minifycss(), rev()],
                    js: [uglify(), rev()]
        }))
        .pipe(gulp.dest('dist/'));
});
@seleregb
Copy link

seleregb commented Jul 27, 2016

what's your jshint task? this ?

gulp.task('jshint', function() { return gulp.src('app/scripts/**/*.js') .pipe(jshint()) .pipe(jshint.reporter(stylish)); });

or can you just paste the whole gulpfile.js

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

2 participants