This commit is contained in:
chrosey
2017-09-13 07:52:34 +02:00
parent a1f16c37f4
commit 2340b0226b
24621 changed files with 2912161 additions and 149 deletions
View File
+8
View File
@@ -0,0 +1,8 @@
# rework-visit
Rework declaration visitor for plugins (and rework core).
# License
MIT
+9
View File
@@ -0,0 +1,9 @@
{
"name": "rework-visit",
"repo": "visionmedia/rework-visit",
"version": "1.0.0",
"description": "Rework declaration visitor utility",
"keywords": ["css", "rework"],
"license": "MIT",
"scripts": ["index.js"]
}
+38
View File
@@ -0,0 +1,38 @@
/**
* Expose `visit()`.
*/
module.exports = visit;
/**
* Visit `node`'s declarations recursively and
* invoke `fn(declarations, node)`.
*
* @param {Object} node
* @param {Function} fn
* @api private
*/
function visit(node, fn){
node.rules.forEach(function(rule){
// @media etc
if (rule.rules) {
visit(rule, fn);
return;
}
// keyframes
if (rule.keyframes) {
rule.keyframes.forEach(function(keyframe){
fn(keyframe.declarations, rule);
});
return;
}
// @charset, @import etc
if (!rule.declarations) return;
fn(rule.declarations, node);
});
};
+66
View File
@@ -0,0 +1,66 @@
{
"_args": [
[
{
"raw": "rework-visit@^1.0.0",
"scope": null,
"escapedName": "rework-visit",
"name": "rework-visit",
"rawSpec": "^1.0.0",
"spec": ">=1.0.0 <2.0.0",
"type": "range"
},
"c:\\xampp\\htdocs\\laravel\\node_modules\\resolve-url-loader"
]
],
"_from": "rework-visit@>=1.0.0 <2.0.0",
"_id": "rework-visit@1.0.0",
"_inCache": true,
"_location": "/rework-visit",
"_npmUser": {
"name": "tjholowaychuk",
"email": "tj@vision-media.ca"
},
"_npmVersion": "1.2.14",
"_phantomChildren": {},
"_requested": {
"raw": "rework-visit@^1.0.0",
"scope": null,
"escapedName": "rework-visit",
"name": "rework-visit",
"rawSpec": "^1.0.0",
"spec": ">=1.0.0 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/resolve-url-loader"
],
"_resolved": "https://registry.npmjs.org/rework-visit/-/rework-visit-1.0.0.tgz",
"_shasum": "9945b2803f219e2f7aca00adb8bc9f640f842c9a",
"_shrinkwrap": null,
"_spec": "rework-visit@^1.0.0",
"_where": "c:\\xampp\\htdocs\\laravel\\node_modules\\resolve-url-loader",
"dependencies": {},
"description": "Rework declaration visitor utility",
"devDependencies": {},
"directories": {},
"dist": {
"shasum": "9945b2803f219e2f7aca00adb8bc9f640f842c9a",
"tarball": "https://registry.npmjs.org/rework-visit/-/rework-visit-1.0.0.tgz"
},
"keywords": [
"css",
"rework"
],
"license": "MIT",
"maintainers": [
{
"name": "tjholowaychuk",
"email": "tj@vision-media.ca"
}
],
"name": "rework-visit",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"version": "1.0.0"
}