css-properties
Advanced tools
Comparing version 0.0.1 to 0.1.0
93
index.js
'use strict'; | ||
module.exports = function cssProperties(options) { | ||
return [ | ||
'background', | ||
'background-attachment', | ||
'background-color', | ||
'background-image', | ||
'background-position', | ||
'background-repeat', | ||
'border', | ||
'border-bottom', | ||
'border-bottom-color', | ||
'border-bottom-style', | ||
'border-bottom-width', | ||
'border-color', | ||
'border-left', | ||
'border-left-color', | ||
'border-left-style', | ||
'border-left-width', | ||
'border-right', | ||
'border-right-color', | ||
'border-right-style', | ||
'border-right-width', | ||
'border-style', | ||
'border-top', | ||
'border-top-color', | ||
'border-top-style', | ||
'border-top-width', | ||
'border-width', | ||
'clear', | ||
'clip', | ||
'color', | ||
'cursor', | ||
'display', | ||
'filter', | ||
'font', | ||
'font-family', | ||
'font-size', | ||
'font-variant', | ||
'font-weight', | ||
'height', | ||
'left', | ||
'letter-spacing', | ||
'line-height', | ||
'list-style', | ||
'list-style-image', | ||
'list-style-position', | ||
'list-style-type', | ||
'margin', | ||
'margin-bottom', | ||
'margin-left', | ||
'margin-right', | ||
'margin-top', | ||
'overflow', | ||
'padding', | ||
'padding-bottom', | ||
'padding-left', | ||
'padding-right', | ||
'padding-top', | ||
'page-break-after', | ||
'page-break-before', | ||
'position', | ||
'float', | ||
'text-align', | ||
'text-decoration', | ||
'text-decoration: blink', | ||
'text-decoration: line-through', | ||
'text-decoration: none', | ||
'text-decoration: overline', | ||
'text-decoration: underline', | ||
'text-indent', | ||
'text-transform', | ||
'top', | ||
'vertical-align', | ||
'visibility', | ||
'width', | ||
'z-index' | ||
]; | ||
} | ||
var buildProperties = require('./build'); | ||
var cssPropertiesJson = require('./w3c-css-properties'); | ||
module.exports = function cssProperties(refUrl, callback) { | ||
if (!callback && !refUrl) { | ||
return cssPropertiesJson.properties | ||
} | ||
return buildProperties(refUrl, callback) | ||
}; | ||
module.exports.json = function json() { | ||
return cssPropertiesJson; | ||
}; | ||
module.exports.api = buildProperties; |
{ | ||
"name": "css-properties", | ||
"description": "List of all CSS properties.", | ||
"description": "Get list of all available (possible) css properties from scraped directly from W3C website - returns array, have API and CLI", | ||
"author": "John Otander", | ||
"version": "0.0.1", | ||
"main": "index.js", | ||
"directories": { | ||
"test": "test" | ||
}, | ||
"version": "0.1.0", | ||
"scripts": { | ||
"test": "mocha test" | ||
"lint": "jshint index.js && jscs index.js --reporter inline", | ||
"test": "mocha", | ||
"test-cov": "istanbul cover _mocha", | ||
"test-travis": "istanbul cover _mocha --report lcovonly" | ||
}, | ||
@@ -19,3 +18,10 @@ "repository": { | ||
"css", | ||
"properties" | ||
"properties", | ||
"w3c", | ||
"scraped", | ||
"possible", | ||
"available", | ||
"api", | ||
"cli", | ||
"property" | ||
], | ||
@@ -27,6 +33,15 @@ "license": "MIT", | ||
"homepage": "https://github.com/johnotander/css-properties", | ||
"dependencies": {}, | ||
"dependencies": { | ||
"cheerio": "^0.18.0", | ||
"each-async": "^1.1.1", | ||
"got": "^2.3.1" | ||
}, | ||
"devDependencies": { | ||
"mocha": "*" | ||
"istanbul-harmony": "^0.3.1", | ||
"mocha": "*", | ||
"mocha-lcov-reporter": "^0.0.1" | ||
}, | ||
"bin": { | ||
"css-properties": "./cli.js" | ||
} | ||
} |
@@ -5,3 +5,4 @@ # css-properties | ||
List of all CSS properties. | ||
Get list of all available (possible) CSS properties scraped directly from W3C website - returns an array. | ||
Also features an API and CLI. | ||
@@ -12,2 +13,3 @@ ## Installation | ||
npm install --save css-properties | ||
css-properties --help | ||
``` | ||
@@ -17,6 +19,17 @@ | ||
```javascript | ||
```js | ||
var cssProperties = require('css-properties'); | ||
cssProperties(); // => ['background', 'background-attachment', ...] | ||
cssProperties([refUrl[,callback]]); | ||
cssProperties(); // => ['background', 'background-attachment', ...] | ||
cssProperties.json(); // => {properties: ['background', 'background-attachment', ...]} | ||
cssProperties(function(err, res) { | ||
// assert.equal(err, null || undefined); | ||
// assert(res.length >= 178); | ||
console.log(res) | ||
// => ['background', 'background-attachment', ...] | ||
}); | ||
``` | ||
@@ -23,0 +36,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12063
11
313
49
3
3
1
1
+ Addedcheerio@^0.18.0
+ Addedeach-async@^1.1.1
+ Addedgot@^2.3.1
+ AddedCSSselect@0.4.1(transitive)
+ AddedCSSwhat@0.4.7(transitive)
+ Addedcheerio@0.18.0(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addeddom-serializer@0.0.1(transitive)
+ Addeddomelementtype@1.1.3(transitive)
+ Addeddomhandler@2.3.0(transitive)
+ Addeddomutils@1.4.31.5.1(transitive)
+ Addedduplexify@3.7.1(transitive)
+ Addedeach-async@1.1.1(transitive)
+ Addedend-of-stream@1.4.4(transitive)
+ Addedentities@1.0.01.1.2(transitive)
+ Addedgot@2.9.2(transitive)
+ Addedhtmlparser2@3.8.3(transitive)
+ Addedinfinity-agent@2.0.3(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedis-stream@1.1.0(transitive)
+ Addedisarray@0.0.11.0.0(transitive)
+ Addedlodash@2.4.2(transitive)
+ Addedlowercase-keys@1.0.1(transitive)
+ Addednested-error-stacks@1.0.2(transitive)
+ Addedobject-assign@2.1.1(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedonetime@1.1.0(transitive)
+ Addedprepend-http@1.0.4(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedread-all-stream@2.2.0(transitive)
+ Addedreadable-stream@1.1.142.3.8(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedset-immediate-shim@1.0.1(transitive)
+ Addedstatuses@1.5.0(transitive)
+ Addedstream-shift@1.0.3(transitive)
+ Addedstring_decoder@0.10.311.1.1(transitive)
+ Addedtimed-out@2.0.0(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
+ Addedwrappy@1.0.2(transitive)