inline-style-parser 0.2.2 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +9 -0
- package/README.md +12 -11
- package/package.json +19 -16
package/LICENSE
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
(The MIT License)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
[](https://codecov.io/gh/remarkablemark/inline-style-parser)
|
|
9
9
|
[](https://www.npmjs.com/package/inline-style-parser)
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Inline style parser copied from [`css/lib/parse/index.js`](https://github.com/reworkcss/css/blob/v2.2.4/lib/parse/index.js):
|
|
12
12
|
|
|
13
13
|
```
|
|
14
14
|
InlineStyleParser(string)
|
|
@@ -17,7 +17,8 @@ InlineStyleParser(string)
|
|
|
17
17
|
Example:
|
|
18
18
|
|
|
19
19
|
```js
|
|
20
|
-
|
|
20
|
+
const parse = require('inline-style-parser');
|
|
21
|
+
|
|
21
22
|
parse('color: #BADA55;');
|
|
22
23
|
```
|
|
23
24
|
|
|
@@ -30,9 +31,7 @@ Output:
|
|
|
30
31
|
position: Position { start: [Object], end: [Object], source: undefined } } ]
|
|
31
32
|
```
|
|
32
33
|
|
|
33
|
-
[JSFiddle](https://jsfiddle.net/remarkablemark/hcxbpwq8/) | [Replit](https://replit.com/@remarkablemark/inline-style-parser)
|
|
34
|
-
|
|
35
|
-
See [usage](#usage) and [examples](https://github.com/remarkablemark/inline-style-parser/tree/master/examples).
|
|
34
|
+
[JSFiddle](https://jsfiddle.net/remarkablemark/hcxbpwq8/) | [Replit](https://replit.com/@remarkablemark/inline-style-parser) | [Examples](https://github.com/remarkablemark/inline-style-parser/tree/master/examples)
|
|
36
35
|
|
|
37
36
|
## Installation
|
|
38
37
|
|
|
@@ -59,16 +58,18 @@ yarn add inline-style-parser
|
|
|
59
58
|
|
|
60
59
|
## Usage
|
|
61
60
|
|
|
62
|
-
Import
|
|
61
|
+
Import with ES Modules:
|
|
63
62
|
|
|
64
63
|
```js
|
|
65
|
-
// CommonJS
|
|
66
|
-
const parse = require('inline-style-parser');
|
|
67
|
-
|
|
68
|
-
// ES Modules
|
|
69
64
|
import parse from 'inline-style-parser';
|
|
70
65
|
```
|
|
71
66
|
|
|
67
|
+
Or require with CommonJS:
|
|
68
|
+
|
|
69
|
+
```js
|
|
70
|
+
const parse = require('inline-style-parser');
|
|
71
|
+
```
|
|
72
|
+
|
|
72
73
|
Parse single declaration:
|
|
73
74
|
|
|
74
75
|
```js
|
|
@@ -225,4 +226,4 @@ Release and publish are automated by [Release Please](https://github.com/googlea
|
|
|
225
226
|
|
|
226
227
|
## License
|
|
227
228
|
|
|
228
|
-
MIT. See [license](https://github.com/reworkcss/css/blob/v2.2.4/LICENSE) from original project.
|
|
229
|
+
[MIT](https://github.com/remarkablemark/inline-style-parser/blob/master/LICENSE). See the [license](https://github.com/reworkcss/css/blob/v2.2.4/LICENSE) from the original project.
|
package/package.json
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "inline-style-parser",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "An inline style parser.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "rollup --config --failAfterWarnings",
|
|
8
8
|
"clean": "rm -rf dist",
|
|
9
|
-
"lint": "eslint
|
|
9
|
+
"lint": "eslint .",
|
|
10
10
|
"lint:fix": "npm run lint -- --fix",
|
|
11
|
-
"
|
|
11
|
+
"prepare": "husky",
|
|
12
|
+
"prepublishOnly": "npm run lint && npm test && npm run build",
|
|
12
13
|
"test": "jest",
|
|
13
14
|
"test:ci": "CI=true jest --ci --colors --coverage --collectCoverageFrom=index.js",
|
|
14
15
|
"test:esm": "node --test test/index.test.mjs",
|
|
15
|
-
"test:watch": "jest --watch"
|
|
16
|
-
"_postinstall": "husky install",
|
|
17
|
-
"postpublish": "pinst --enable"
|
|
16
|
+
"test:watch": "jest --watch"
|
|
18
17
|
},
|
|
19
18
|
"repository": {
|
|
20
19
|
"type": "git",
|
|
@@ -31,19 +30,23 @@
|
|
|
31
30
|
"css"
|
|
32
31
|
],
|
|
33
32
|
"devDependencies": {
|
|
34
|
-
"@commitlint/cli": "
|
|
35
|
-
"@commitlint/config-conventional": "
|
|
36
|
-
"@
|
|
33
|
+
"@commitlint/cli": "19.4.1",
|
|
34
|
+
"@commitlint/config-conventional": "19.4.1",
|
|
35
|
+
"@eslint/compat": "1.1.1",
|
|
36
|
+
"@eslint/eslintrc": "3.1.0",
|
|
37
|
+
"@eslint/js": "9.9.1",
|
|
38
|
+
"@rollup/plugin-commonjs": "26.0.1",
|
|
37
39
|
"@rollup/plugin-terser": "0.4.4",
|
|
38
40
|
"css": "3.0.0",
|
|
39
|
-
"eslint": "
|
|
40
|
-
"eslint-plugin-prettier": "5.
|
|
41
|
-
"
|
|
41
|
+
"eslint": "9.9.1",
|
|
42
|
+
"eslint-plugin-prettier": "5.2.1",
|
|
43
|
+
"eslint-plugin-simple-import-sort": "12.1.1",
|
|
44
|
+
"globals": "15.9.0",
|
|
45
|
+
"husky": "9.1.5",
|
|
42
46
|
"jest": "29.7.0",
|
|
43
|
-
"lint-staged": "
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"rollup": "4.1.0"
|
|
47
|
+
"lint-staged": "15.2.9",
|
|
48
|
+
"prettier": "3.3.3",
|
|
49
|
+
"rollup": "4.21.1"
|
|
47
50
|
},
|
|
48
51
|
"files": [
|
|
49
52
|
"/dist",
|