summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Loach <robloach@gmail.com>2015-02-23 11:20:59 -0500
committerRob Loach <robloach@gmail.com>2015-02-23 11:20:59 -0500
commitd7ac18a0765d758f9a3ec5cea417d90450ed3b3a (patch)
tree2c957383c9ecc8cf66957e35e4cdb21729dc6821
parent4755aaac2ed40f667a5e4c4bacbe6dfb3207f701 (diff)
downloadjquery-once-d7ac18a0765d758f9a3ec5cea417d90450ed3b3a.zip
jquery-once-d7ac18a0765d758f9a3ec5cea417d90450ed3b3a.tar.gz
jquery-once-d7ac18a0765d758f9a3ec5cea417d90450ed3b3a.tar.bz2
Update dependencies
-rw-r--r--.gitignore1
-rw-r--r--.travis.yml18
-rw-r--r--API.md43
-rw-r--r--README.md2
-rw-r--r--bower.json8
-rw-r--r--component.json2
-rw-r--r--jquery.once.js8
-rw-r--r--package.json20
8 files changed, 61 insertions, 41 deletions
diff --git a/.gitignore b/.gitignore
index 5056d1c..bffa39e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,6 +15,7 @@ out/
# Private Files
.env
.idea
+.cake_task_cache
# =====================================
diff --git a/.travis.yml b/.travis.yml
index 43a33bc..ee0b69d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,10 +1,24 @@
-# v1.3.21 June 23, 2014
+# February 19, 2015
# https://github.com/bevry/base
language: node_js
+# ensure npm is the latest version (ignore node versions that can't run it)
+# ensure coffee-script is installed (needed for cake commands)
+# ensure dev dependencies are installed (handled via npm install)
+# ensure test dependencies are installed (handled via cake install)
+#install: "npm install -g npm && npm install coffee-script && npm install && ./node_modules/.bin/cake install"
+# ensure our application is compiled before we run our tests
+#before_script: "./node_modules/.bin/cake compile"
+#script: "npm test"
node_js:
- "0.10"
+ - "0.12"
+ - iojs
cache:
directories:
- node_modules
notifications:
- email: false
+ irc:
+ - "irc.freenode.org#bevry-dev"
+ email:
+ recipients:
+ - travisci@bevry.me
diff --git a/API.md b/API.md
index 1bc62b5..08cd0b7 100644
--- a/API.md
+++ b/API.md
@@ -1,4 +1,4 @@
-##Globals
+## Functions
<dl>
<dt><a href="#once">once([id])</a> </dt>
<dd><p>Filter elements that have yet to be processed by the given data ID.</p>
@@ -11,21 +11,24 @@
</dd>
</dl>
<a name="once"></a>
-##once([id])
+## once([id])
Filter elements that have yet to be processed by the given data ID.
-| Param | Type | Description |
-| ----- | ---- | ----------- |
-| \[id=<code>&quot;once&quot;</code>\] | <code>string</code> | The data ID used to determine whether the given elements have already been processed or not. Defaults to `"once"`. |
-
+**Scope**: global function
**Returns**: jQuery collection of elements that have now run once by
the given ID.
+**this**: jQuery
**Access:** public
**See**
- removeOnce
- findOnce
+
+| Param | Type | Default | Description |
+| --- | --- | --- | --- |
+| [id] | <code>string</code> | <code>&quot;once&quot;</code> | The data ID used to determine whether the given elements have already been processed or not. Defaults to `"once"`. |
+
**Example**
``` javascript
// The following will change the color of each paragraph to red, just once
@@ -47,19 +50,19 @@ $('div.calendar').once().each(function() {
});
```
<a name="removeOnce"></a>
-##removeOnce([id])
+## removeOnce([id])
Removes the once data from elements, based on the given ID.
-| Param | Type | Description |
-| ----- | ---- | ----------- |
-| \[id=<code>&quot;once&quot;</code>\] | <code>string</code> | A string representing the name of the data ID which should be used when filtering the elements. This only filters elements that have already been processed by the once function. The ID should be the same ID that was originally passed to the once() function. Defaults to `"once"`. |
-
+**Scope**: global function
**Returns**: jQuery collection of elements that were acted upon to remove their
once data.
+**this**: jQuery
**Access:** public
-**See**
+**See**: once
-- once
+| Param | Type | Default | Description |
+| --- | --- | --- | --- |
+| [id] | <code>string</code> | <code>&quot;once&quot;</code> | A string representing the name of the data ID which should be used when filtering the elements. This only filters elements that have already been processed by the once function. The ID should be the same ID that was originally passed to the once() function. Defaults to `"once"`. |
**Example**
``` javascript
@@ -73,18 +76,18 @@ $("div.calendar").removeOnce().each(function() {
});
```
<a name="findOnce"></a>
-##findOnce([id])
+## findOnce([id])
Filters elements that have already been processed once.
-| Param | Type | Description |
-| ----- | ---- | ----------- |
-| \[id=<code>&quot;once&quot;</code>\] | <code>string</code> | A string representing the name of the data id which should be used when filtering the elements. This only filters elements that have already been processed by the once function. The id should be the same id that was originally passed to the once() function. Defaults to "once". |
-
+**Scope**: global function
**Returns**: jQuery collection of elements that have been run once.
+**this**: jQuery
**Access:** public
-**See**
+**See**: once
-- once
+| Param | Type | Default | Description |
+| --- | --- | --- | --- |
+| [id] | <code>string</code> | <code>&quot;once&quot;</code> | A string representing the name of the data id which should be used when filtering the elements. This only filters elements that have already been processed by the once function. The id should be the same id that was originally passed to the once() function. Defaults to "once". |
**Example**
``` javascript
diff --git a/README.md b/README.md
index 84570cf..1789f2f 100644
--- a/README.md
+++ b/README.md
@@ -42,7 +42,7 @@ be used to ensure that a function is only applied once to an element.
- Install: `npm install --save jquery-once`
- CDN URL: `//wzrd.in/bundle/jquery-once@2.0.0`
-### [Ender](http://ender.jit.su/)
+### [Ender](http://enderjs.com)
- Use: `require('jquery-once')`
- Install: `ender add jquery-once`
diff --git a/bower.json b/bower.json
index f6de67f..9168c3f 100644
--- a/bower.json
+++ b/bower.json
@@ -1,8 +1,9 @@
{
"name": "jquery-once",
"homepage": "http://github.com/robloach/jquery-once",
- "description": "jQuery Once",
+ "description": "Act on jQuery elements only once.",
"version": "2.0.0",
+ "license": "GPL-2.0",
"main": "jquery.once.js",
"ignore": [
"*.json",
@@ -13,7 +14,8 @@
"Gruntfile.js"
],
"keywords": [
- "jquery"
+ "jquery",
+ "jquery-plugin"
],
"dependencies": {
"jquery": "*"
@@ -27,4 +29,4 @@
"projectz": "~0.3.17",
"uglify-js": "~2.4.16"
}
-} \ No newline at end of file
+}
diff --git a/component.json b/component.json
index 84a0352..485bb1e 100644
--- a/component.json
+++ b/component.json
@@ -20,4 +20,4 @@
"jquery.once.min.js"
],
"demo": "http://github.com/robloach/jquery-once"
-} \ No newline at end of file
+}
diff --git a/jquery.once.js b/jquery.once.js
index 63e141e..6d258a6 100644
--- a/jquery.once.js
+++ b/jquery.once.js
@@ -32,7 +32,7 @@
/**
* Ensures that the given ID is valid, returning "once" if one is not given.
*
- * @param {string} [id="once"]
+ * @param {string} [id=once]
* A string representing the ID to check. Defaults to `"once"`.
*
* @returns The valid ID name.
@@ -51,7 +51,7 @@
/**
* Filter elements that have yet to be processed by the given data ID.
*
- * @param {string} [id="once"]
+ * @param {string} [id=once]
* The data ID used to determine whether the given elements have already
* been processed or not. Defaults to `"once"`.
*
@@ -99,7 +99,7 @@
/**
* Removes the once data from elements, based on the given ID.
*
- * @param {string} [id="once"]
+ * @param {string} [id=once]
* A string representing the name of the data ID which should be used when
* filtering the elements. This only filters elements that have already been
* processed by the once function. The ID should be the same ID that was
@@ -134,7 +134,7 @@
/**
* Filters elements that have already been processed once.
*
- * @param {string} [id="once"]
+ * @param {string} [id=once]
* A string representing the name of the data id which should be used when
* filtering the elements. This only filters elements that have already
* been processed by the once function. The id should be the same id that
diff --git a/package.json b/package.json
index a2151ec..65beb02 100644
--- a/package.json
+++ b/package.json
@@ -50,20 +50,20 @@
"jquery": "*"
},
"devDependencies": {
- "eslint": "~0.13.0",
- "jsdoc-to-markdown": "~0.6.2",
- "jsdom": "~3.0.1",
+ "eslint": "^0.13.0",
+ "jsdoc-to-markdown": "^0.6.4",
+ "jsdom": "^3.0.3",
"mocha": "~2.1.0",
- "mocha-jsdom": "~0.2.0",
- "projectz": "~0.3.17",
+ "mocha-jsdom": "^0.2.1",
+ "projectz": "^0.4.3",
"uglify-js": "~2.4.16"
},
"scripts": {
- "pretest": "./node_modules/.bin/eslint jquery.once.js test/test.js",
- "test": "./node_modules/.bin/mocha",
- "projectz": "./node_modules/.bin/projectz compile",
- "docs": "./node_modules/.bin/jsdoc2md jquery.once.js > API.md",
- "build": "./node_modules/.bin/uglifyjs jquery.once.js -o jquery.once.min.js --comments --source-map jquery.once.min.js.map --mangle",
+ "pretest": "eslint jquery.once.js test/test.js",
+ "test": "mocha",
+ "projectz": "projectz compile",
+ "docs": "jsdoc2md jquery.once.js > API.md",
+ "build": "uglifyjs jquery.once.js -o jquery.once.min.js --comments --source-map jquery.once.min.js.map --mangle",
"package": "npm install && npm run test && npm run projectz && npm run docs && npm run build"
}
}