linkedin / dustjs

Asynchronous Javascript templating for the browser and server
http://dustjs.com
MIT License
2.91k stars 479 forks source link

request - update license comment tag for compressors #466

Closed jvanasco closed 10 years ago

jvanasco commented 10 years ago

i'd like to suggest replacing this style:

//
// Dust - Asynchronous Templating v2.2.3
// http://akdubya.github.com/dustjs
//
// Copyright (c) 2010, Aleksander Williams
// Released under the MIT License.
//

with this style :

/*!
Dust - Asynchronous Templating v2.2.3
http://akdubya.github.com/dustjs

Copyright (c) 2010, Aleksander Williams
Released under the MIT License.
*/

the "!" in multiline comments are often interpreted by javascript compressors as a "preserved" comment.

for example, the YUI compressor: https://github.com/yui/yuicompressor/blob/master/README.md

C-style comments starting with /*! are preserved. This is useful with comments containing copyright/license information. As of 2.4.8, the '!' is no longer dropped by YUICompressor. For example:

this is useful for preserving the comment tag when dust.js gets included into a large project , and it can accidentally get minified out.

jvanasco commented 10 years ago

this seems to have been done in the 2.3 branch ( i was on 2.2 ) so closing1

jimmyhchan commented 10 years ago

thanks for the report in any case.