-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add an option to wrap merged files to IIFE #27
Conversation
|
||
return [ | ||
'/* begin: ' + fn + ' */\n', | ||
iife && 'function(){\n', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Это не надёжная запись, если убрать переносы строк код не сработает.
Возможные варианты: http://stackoverflow.com/questions/8228281/what-is-the-function-construct-in-javascript.
Я бы просто обернул в круглые скобки:
(function(){
}());
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Исправлю.
Написал замечания. |
Замечания исправила (кроме toString()), про изолированность сейчас подумаю. |
iife = this._iife || ''; | ||
|
||
return [ | ||
'/* begin: ' + relPath + ' */\n', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Использовать \n
не правильно для Windows.
Нужно использовать require('os').EOL
.
Соскваш коммиты, в остальном 🆗 |
@blond готово, спасибо! |
Add an option to wrap merged files to IIFE
Close #6