jonkemp / gulp-useref

Parse build blocks in HTML files to replace references to non-optimized scripts or stylesheets.
MIT License
705 stars 93 forks source link

concat error #205

Closed shibiaoz closed 8 years ago

shibiaoz commented 8 years ago

concat two files ,but there is no semicolon between different files, code in html

<!-- build:js scripts/combined.js -->
    <script type="text/javascript" src="scripts/one.js"></script> 
    <script type="text/javascript" src="scripts/two.js"></script> 
    <!-- endbuild -->

code in one.js

;(function (){
    console.log('onew')
})(window)

code in two.js

(function() {
    console.log('two')
})(window)

combined.js

;(function (){
    console.log('onew')
})(window)
(function() {
    console.log('two')
})(window)

so how to add semicolon between files ,if the last files do not have semicolon in header

shibiaoz commented 8 years ago

the combined.js is error in browser

jonkemp commented 8 years ago

There is an option for this now. It's not been published to npm yet. Soon hopefully.

jonkemp commented 8 years ago

Published v3.1.0.

shibiaoz commented 8 years ago

ok,i try it,now it is right ,thank you @jonkemp