Skip to content

Commit

Permalink
- remove noConflict()
Browse files Browse the repository at this point in the history
- new laxcomma option in jshint
- bump version
  • Loading branch information
ded committed Feb 16, 2012
1 parent eead35e commit 711b931
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 28 deletions.
1 change: 1 addition & 0 deletions Makefile.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ require('smoosh').config({
, "whitespace": true
, "asi": true
, "laxbreak": true
, "laxcomma": true
, "eqeqeq": false
, "eqnull": true
}
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ $script.js - Async JavaScript loader and dependency manager

Browser Support
---------------
* IE 6, 7, 8, 9
* Opera 10, 11
* Safari 3, 4, 5
* Chrome 9, 10, beta
* Firefox 2, 3, beta
* IE 6+
* Opera 10+
* Safari 3+
* Chrome 9+
* Firefox 2+
* Lynx (just kidding)

Examples
Expand Down
8 changes: 1 addition & 7 deletions dist/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
var win = this, doc = document
, head = doc.getElementsByTagName('head')[0]
, validBase = /^https?:\/\//
, old = win.$script, list = {}, ids = {}, delay = {}, scriptpath
, list = {}, ids = {}, delay = {}, scriptpath
, scripts = {}, s = 'string', f = false
, push = 'push', domContentLoaded = 'DOMContentLoaded', readyState = 'readyState'
, addEventListener = 'addEventListener', onreadystatechange = 'onreadystatechange'
Expand Down Expand Up @@ -108,11 +108,5 @@
}(deps.join('|'))
return $script
}

$script.noConflict = function () {
win.$script = old;
return this
}

return $script
})
2 changes: 1 addition & 1 deletion dist/script.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "scriptjs"
, "description": "Asyncronous JavaScript loader and dependency manager"
, "keywords": ["ender", "script", "dependency", "ajax", "jsonp", "loader"]
, "version": "2.2.2"
, "version": "2.2.3"
, "homepage": "https://github.com/ded/script.js"
, "author": "Dustin Diaz <dustin@dustindiaz.com> (http://dustindiaz.com)"
, "contributors": ["Jacob Thornton <jacob@twitter.com> (https://github.com/fat)"]
Expand Down
8 changes: 1 addition & 7 deletions src/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
var win = this, doc = document
, head = doc.getElementsByTagName('head')[0]
, validBase = /^https?:\/\//
, old = win.$script, list = {}, ids = {}, delay = {}, scriptpath
, list = {}, ids = {}, delay = {}, scriptpath
, scripts = {}, s = 'string', f = false
, push = 'push', domContentLoaded = 'DOMContentLoaded', readyState = 'readyState'
, addEventListener = 'addEventListener', onreadystatechange = 'onreadystatechange'
Expand Down Expand Up @@ -102,11 +102,5 @@
}(deps.join('|'))
return $script
}

$script.noConflict = function () {
win.$script = old;
return this
}

return $script
})
2 changes: 1 addition & 1 deletion tests/test.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<script src="../src/script.js"></script>
<script src="../node_modules/sink-test/src/sink.js"></script>
<script type="text/javascript">
var script = $script.noConflict();
var script = $script
</script>
<script type="text/javascript">
script('tests.js?' + (new Date).getTime())
Expand Down
6 changes: 0 additions & 6 deletions tests/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@ script('../node_modules/domready/ready.js', function () {

domReady(function() {

sink('no conflict', function (test, ok) {
test('should return old $script back to context', 1, function () {
ok($script() == 'success', 'old $script called')
})
})

sink('Basic', function(test, ok, before, after) {

test('should call from chained ready calls', 4, function() {
Expand Down

0 comments on commit 711b931

Please sign in to comment.