adding more flexibilty

hopefully this is how you do amd support
This commit is contained in:
deltreey
2015-08-09 18:11:21 -04:00
parent 29e9988902
commit d0c0de6b73
6 changed files with 50 additions and 15 deletions

View File

@@ -11,5 +11,20 @@
"node": true,
"sub": true,
"undef": true,
"esnext": true
"esnext": true,
"globals": {
"define": true,
"angular": true,
"console": true,
"moment": true,
"describe": true,
"beforeEach": true,
"module": true,
"inject": true,
"it": true,
"expect": true,
"browser": true,
"element": true,
"by": true
}
}

View File

@@ -54,14 +54,24 @@
<pre
class="sunlight-highlight-javascript linenums">'use strict';
var wildstring = (function(module) {
(function (root, definition) {
if (typeof(module) !== 'undefined') {
module.exports = definition();
}
else if (typeof(define) === 'function' &amp;&amp; typeof(define.amd) === 'object') {
define(definition);
}
else {
this['wildstring'] = definition();
}
}('wildstring', function () {
/**
* @namespace wildstring
* @property {string} wildcard the wildcard to use in your strings, defaults to '*'
* @property {boolean} caseSensitive whether matches should care about case, defaults to true
*/
wildstring = {
var wildstring = {
wildcard: '*',
caseSensitive: true
};
@@ -230,7 +240,7 @@ wildstring.replace = function (pattern, strings) {
module.exports = wildstring;
return wildstring;
}(module || {}));
}));
</pre>
</article>
</section>
@@ -260,7 +270,7 @@ return wildstring;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.2</a>
on Wed Aug 5th 2015 using the <a
on Sun Aug 9th 2015 using the <a
href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>

View File

@@ -138,7 +138,7 @@ grunt</code></pre><p>grunt will run all the tests and jshint, so just make sure
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.2</a>
on Wed Aug 5th 2015 using the <a
on Sun Aug 9th 2015 using the <a
href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>

View File

@@ -165,7 +165,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.2</a>
on Wed Aug 5th 2015 using the <a
on Sun Aug 9th 2015 using the <a
href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>

View File

@@ -176,7 +176,7 @@
<ul class="dummy">
<li>
<a href="F__Git_wildstring_wildstring.js.html">F:/Git/wildstring/wildstring.js</a>,
<a href="F__Git_wildstring_wildstring.js.html#sunlight-1-line-5">line 5</a>
<a href="F__Git_wildstring_wildstring.js.html#sunlight-1-line-15">line 15</a>
</li>
</ul>
</dd>
@@ -339,7 +339,7 @@
<ul class="dummy">
<li>
<a href="F__Git_wildstring_wildstring.js.html">F:/Git/wildstring/wildstring.js</a>,
<a href="F__Git_wildstring_wildstring.js.html#sunlight-1-line-22">line 22</a>
<a href="F__Git_wildstring_wildstring.js.html#sunlight-1-line-32">line 32</a>
</li>
</ul>
</dd>
@@ -498,7 +498,7 @@
<ul class="dummy">
<li>
<a href="F__Git_wildstring_wildstring.js.html">F:/Git/wildstring/wildstring.js</a>,
<a href="F__Git_wildstring_wildstring.js.html#sunlight-1-line-70">line 70</a>
<a href="F__Git_wildstring_wildstring.js.html#sunlight-1-line-80">line 80</a>
</li>
</ul>
</dd>
@@ -662,7 +662,7 @@
<ul class="dummy">
<li>
<a href="F__Git_wildstring_wildstring.js.html">F:/Git/wildstring/wildstring.js</a>,
<a href="F__Git_wildstring_wildstring.js.html#sunlight-1-line-147">line 147</a>
<a href="F__Git_wildstring_wildstring.js.html#sunlight-1-line-157">line 157</a>
</li>
</ul>
</dd>
@@ -761,7 +761,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.2</a>
on Wed Aug 5th 2015 using the <a
on Sun Aug 9th 2015 using the <a
href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>

View File

@@ -1,13 +1,23 @@
'use strict';
var wildstring = (function(module) {
(function (root, definition) {
if (typeof(module) !== 'undefined') {
module.exports = definition();
}
else if (typeof(define) === 'function' && typeof(define.amd) === 'object') {
define(definition);
}
else {
this['wildstring'] = definition();
}
}('wildstring', function () {
/**
* @namespace wildstring
* @property {string} wildcard the wildcard to use in your strings, defaults to '*'
* @property {boolean} caseSensitive whether matches should care about case, defaults to true
*/
wildstring = {
var wildstring = {
wildcard: '*',
caseSensitive: true
};
@@ -176,4 +186,4 @@ wildstring.replace = function (pattern, strings) {
module.exports = wildstring;
return wildstring;
}(module || {}));
}));