first commit
This commit is contained in:
2
bootstrap/node_modules/component-query/.npmignore
generated
vendored
Normal file
2
bootstrap/node_modules/component-query/.npmignore
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
components
|
||||
build
|
18
bootstrap/node_modules/component-query/History.md
generated
vendored
Normal file
18
bootstrap/node_modules/component-query/History.md
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
|
||||
0.0.3 / 2014-02-10
|
||||
==================
|
||||
|
||||
* package: rename to "component-query"
|
||||
* package: add "component" section
|
||||
* component: beautify "keywords"
|
||||
|
||||
0.0.2 / 2013-11-01
|
||||
==================
|
||||
|
||||
* return exports on `exports.engine()`
|
||||
* add `package.json` file
|
||||
|
||||
0.0.1 / 2013-03-14
|
||||
==================
|
||||
|
||||
* initial commit
|
11
bootstrap/node_modules/component-query/Makefile
generated
vendored
Normal file
11
bootstrap/node_modules/component-query/Makefile
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
build: components index.js
|
||||
@component build --dev
|
||||
|
||||
components: component.json
|
||||
@component install --dev
|
||||
|
||||
clean:
|
||||
rm -fr build components template.js
|
||||
|
||||
.PHONY: clean
|
42
bootstrap/node_modules/component-query/Readme.md
generated
vendored
Normal file
42
bootstrap/node_modules/component-query/Readme.md
generated
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
# query
|
||||
|
||||
Query the DOM with selector engine fallback support. This abstraction
|
||||
allows all other components that require dom querying to indirectly support
|
||||
old browsers, without explicitly adding support for them.
|
||||
|
||||
## Installation
|
||||
|
||||
$ component install component/query
|
||||
|
||||
## API
|
||||
|
||||
### query(selector, [el])
|
||||
|
||||
Query `selector` against the document or `el`
|
||||
and return a single match.
|
||||
|
||||
```js
|
||||
query('ul > li');
|
||||
query('ul > li', articles);
|
||||
```
|
||||
|
||||
### query.all(selector, [el])
|
||||
|
||||
Query `selector` against the document or `el`
|
||||
and return all matches.
|
||||
|
||||
```js
|
||||
query.all('ul > li');
|
||||
query.all('ul > li', articles);
|
||||
```
|
||||
|
||||
## Fallback engines
|
||||
|
||||
Currently supported:
|
||||
|
||||
- [query-zest](https://github.com/component/query-zest)
|
||||
- [query-qwery](https://github.com/jamischarles/query-qwery)
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
21
bootstrap/node_modules/component-query/component.json
generated
vendored
Normal file
21
bootstrap/node_modules/component-query/component.json
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "query",
|
||||
"repo": "component/query",
|
||||
"description": "Query the DOM with selector engine fallback support",
|
||||
"version": "0.0.3",
|
||||
"keywords": [
|
||||
"query",
|
||||
"selector",
|
||||
"engine",
|
||||
"dom",
|
||||
"elements"
|
||||
],
|
||||
"dependencies": {},
|
||||
"development": {
|
||||
"component/assert": "*"
|
||||
},
|
||||
"license": "MIT",
|
||||
"scripts": [
|
||||
"index.js"
|
||||
]
|
||||
}
|
19
bootstrap/node_modules/component-query/example.html
generated
vendored
Normal file
19
bootstrap/node_modules/component-query/example.html
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Query</title>
|
||||
</head>
|
||||
<body>
|
||||
<ul>
|
||||
<li>one</li>
|
||||
<li>two</li>
|
||||
<li>three</li>
|
||||
</ul>
|
||||
|
||||
<script src="build/build.js"></script>
|
||||
<script>
|
||||
var query = require('query');
|
||||
console.log(query('ul > li'));
|
||||
console.log(query.all('ul > li'));
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
21
bootstrap/node_modules/component-query/index.js
generated
vendored
Normal file
21
bootstrap/node_modules/component-query/index.js
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
function one(selector, el) {
|
||||
return el.querySelector(selector);
|
||||
}
|
||||
|
||||
exports = module.exports = function(selector, el){
|
||||
el = el || document;
|
||||
return one(selector, el);
|
||||
};
|
||||
|
||||
exports.all = function(selector, el){
|
||||
el = el || document;
|
||||
return el.querySelectorAll(selector);
|
||||
};
|
||||
|
||||
exports.engine = function(obj){
|
||||
if (!obj.one) throw new Error('.one callback required');
|
||||
if (!obj.all) throw new Error('.all callback required');
|
||||
one = obj.one;
|
||||
exports.all = obj.all;
|
||||
return exports;
|
||||
};
|
24
bootstrap/node_modules/component-query/package.json
generated
vendored
Normal file
24
bootstrap/node_modules/component-query/package.json
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"name": "component-query",
|
||||
"description": "Query the DOM with selector engine fallback support",
|
||||
"version": "0.0.3",
|
||||
"keywords": [
|
||||
"query",
|
||||
"selector",
|
||||
"engine",
|
||||
"dom",
|
||||
"elements"
|
||||
],
|
||||
"dependencies": {},
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/component/query.git"
|
||||
},
|
||||
"component": {
|
||||
"scripts": {
|
||||
"query/index.js": "index.js"
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user