Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Prohibit 'globalstrict' jshint option in favor of 'strict', for src and demo files. #134

Closed
wants to merge 1 commit into from

Conversation

thgreasi
Copy link
Contributor

In an effort to improve the situation described in #133.

@alexilyaev
Copy link
Contributor

+1

@douglasduteil
Copy link
Contributor

Following #133 (comment)

We can add a concatenation process with the ngmin.
It'll add on the header :

(function() { 'use strict';
// or 
(function(window, document, undefined) { 'use strict';

and on the footer :

})();
// or 
})(window, document);

Inspired by loader.prefix and angular.prefix

@thgreasi
Copy link
Contributor Author

I guess it's better to follow the angularjs pattern.
That way we can still have globalstrict and we might even use the prefix & suffix for something more that a closure at some point.
My only concern is that some developers, in order to try a library, prefer to just copy&paste the js file in the SRC directory, instead of using grunt install or making their own build. These developers will still face the problem described in #133.

@douglasduteil
Copy link
Contributor

My only concern is that some developers, in order to try a library, prefer to just copy&paste the js file in the SRC directory, instead of using grunt install or making their only build.

you mean bower install right ?

@douglasduteil
Copy link
Contributor

Yeah I think using the prefix & suffix will allow them to do as they want.
The master ant srcX.Y.Z tag will content sources without use strict
But the official version vX.Y.Z will still have it.

@thgreasi
Copy link
Contributor Author

Yes, sorry bower install.

@thgreasi thgreasi closed this Feb 28, 2014
douglasduteil added a commit to douglasduteil/ui-sortable that referenced this pull request Feb 28, 2014
Following angular-ui#134 and angular-ui#133
Auto surround the sources
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants