@csstools/postcss-stepped-value-functions 1.0.0

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/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ # Changes to PostCSS Stepped Value Functions
2
+
3
+ ### 1.0.0 (May 2, 2022)
4
+
5
+ - Initial version
package/LICENSE.md ADDED
@@ -0,0 +1,108 @@
1
+ # CC0 1.0 Universal
2
+
3
+ ## Statement of Purpose
4
+
5
+ The laws of most jurisdictions throughout the world automatically confer
6
+ exclusive Copyright and Related Rights (defined below) upon the creator and
7
+ subsequent owner(s) (each and all, an “owner”) of an original work of
8
+ authorship and/or a database (each, a “Work”).
9
+
10
+ Certain owners wish to permanently relinquish those rights to a Work for the
11
+ purpose of contributing to a commons of creative, cultural and scientific works
12
+ (“Commons”) that the public can reliably and without fear of later claims of
13
+ infringement build upon, modify, incorporate in other works, reuse and
14
+ redistribute as freely as possible in any form whatsoever and for any purposes,
15
+ including without limitation commercial purposes. These owners may contribute
16
+ to the Commons to promote the ideal of a free culture and the further
17
+ production of creative, cultural and scientific works, or to gain reputation or
18
+ greater distribution for their Work in part through the use and efforts of
19
+ others.
20
+
21
+ For these and/or other purposes and motivations, and without any expectation of
22
+ additional consideration or compensation, the person associating CC0 with a
23
+ Work (the “Affirmer”), to the extent that he or she is an owner of Copyright
24
+ and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and
25
+ publicly distribute the Work under its terms, with knowledge of his or her
26
+ Copyright and Related Rights in the Work and the meaning and intended legal
27
+ effect of CC0 on those rights.
28
+
29
+ 1. Copyright and Related Rights. A Work made available under CC0 may be
30
+ protected by copyright and related or neighboring rights (“Copyright and
31
+ Related Rights”). Copyright and Related Rights include, but are not limited
32
+ to, the following:
33
+ 1. the right to reproduce, adapt, distribute, perform, display, communicate,
34
+ and translate a Work;
35
+ 2. moral rights retained by the original author(s) and/or performer(s);
36
+ 3. publicity and privacy rights pertaining to a person’s image or likeness
37
+ depicted in a Work;
38
+ 4. rights protecting against unfair competition in regards to a Work,
39
+ subject to the limitations in paragraph 4(i), below;
40
+ 5. rights protecting the extraction, dissemination, use and reuse of data in
41
+ a Work;
42
+ 6. database rights (such as those arising under Directive 96/9/EC of the
43
+ European Parliament and of the Council of 11 March 1996 on the legal
44
+ protection of databases, and under any national implementation thereof,
45
+ including any amended or successor version of such directive); and
46
+ 7. other similar, equivalent or corresponding rights throughout the world
47
+ based on applicable law or treaty, and any national implementations
48
+ thereof.
49
+
50
+ 2. Waiver. To the greatest extent permitted by, but not in contravention of,
51
+ applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
52
+ unconditionally waives, abandons, and surrenders all of Affirmer’s Copyright
53
+ and Related Rights and associated claims and causes of action, whether now
54
+ known or unknown (including existing as well as future claims and causes of
55
+ action), in the Work (i) in all territories worldwide, (ii) for the maximum
56
+ duration provided by applicable law or treaty (including future time
57
+ extensions), (iii) in any current or future medium and for any number of
58
+ copies, and (iv) for any purpose whatsoever, including without limitation
59
+ commercial, advertising or promotional purposes (the “Waiver”). Affirmer
60
+ makes the Waiver for the benefit of each member of the public at large and
61
+ to the detriment of Affirmer’s heirs and successors, fully intending that
62
+ such Waiver shall not be subject to revocation, rescission, cancellation,
63
+ termination, or any other legal or equitable action to disrupt the quiet
64
+ enjoyment of the Work by the public as contemplated by Affirmer’s express
65
+ Statement of Purpose.
66
+
67
+ 3. Public License Fallback. Should any part of the Waiver for any reason be
68
+ judged legally invalid or ineffective under applicable law, then the Waiver
69
+ shall be preserved to the maximum extent permitted taking into account
70
+ Affirmer’s express Statement of Purpose. In addition, to the extent the
71
+ Waiver is so judged Affirmer hereby grants to each affected person a
72
+ royalty-free, non transferable, non sublicensable, non exclusive,
73
+ irrevocable and unconditional license to exercise Affirmer’s Copyright and
74
+ Related Rights in the Work (i) in all territories worldwide, (ii) for the
75
+ maximum duration provided by applicable law or treaty (including future time
76
+ extensions), (iii) in any current or future medium and for any number of
77
+ copies, and (iv) for any purpose whatsoever, including without limitation
78
+ commercial, advertising or promotional purposes (the “License”). The License
79
+ shall be deemed effective as of the date CC0 was applied by Affirmer to the
80
+ Work. Should any part of the License for any reason be judged legally
81
+ invalid or ineffective under applicable law, such partial invalidity or
82
+ ineffectiveness shall not invalidate the remainder of the License, and in
83
+ such case Affirmer hereby affirms that he or she will not (i) exercise any
84
+ of his or her remaining Copyright and Related Rights in the Work or (ii)
85
+ assert any associated claims and causes of action with respect to the Work,
86
+ in either case contrary to Affirmer’s express Statement of Purpose.
87
+
88
+ 4. Limitations and Disclaimers.
89
+ 1. No trademark or patent rights held by Affirmer are waived, abandoned,
90
+ surrendered, licensed or otherwise affected by this document.
91
+ 2. Affirmer offers the Work as-is and makes no representations or warranties
92
+ of any kind concerning the Work, express, implied, statutory or
93
+ otherwise, including without limitation warranties of title,
94
+ merchantability, fitness for a particular purpose, non infringement, or
95
+ the absence of latent or other defects, accuracy, or the present or
96
+ absence of errors, whether or not discoverable, all to the greatest
97
+ extent permissible under applicable law.
98
+ 3. Affirmer disclaims responsibility for clearing rights of other persons
99
+ that may apply to the Work or any use thereof, including without
100
+ limitation any person’s Copyright and Related Rights in the Work.
101
+ Further, Affirmer disclaims responsibility for obtaining any necessary
102
+ consents, permissions or other rights required for any use of the Work.
103
+ 4. Affirmer understands and acknowledges that Creative Commons is not a
104
+ party to this document and has no duty or obligation with respect to this
105
+ CC0 or use of the Work.
106
+
107
+ For more information, please see
108
+ http://creativecommons.org/publicdomain/zero/1.0/.
package/README.md ADDED
@@ -0,0 +1,137 @@
1
+ # PostCSS Stepped Value Functions [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS Logo" width="90" height="90" align="right">][postcss]
2
+
3
+ [<img alt="npm version" src="https://img.shields.io/npm/v/@csstools/postcss-stepped-value-functions.svg" height="20">][npm-url]
4
+ [<img alt="CSS Standard Status" src="https://cssdb.org/images/badges/stepped-value-functions.svg" height="20">][css-url]
5
+ [<img alt="Build Status" src="https://github.com/csstools/postcss-plugins/workflows/test/badge.svg" height="20">][cli-url]
6
+ [<img alt="Discord" src="https://shields.io/badge/Discord-5865F2?logo=discord&logoColor=white">][discord]
7
+
8
+ [PostCSS Stepped Value Functions] lets you use `round`, `rem` and `mod` stepped value functions, following the [CSS Values 4].
9
+
10
+ ```pcss
11
+ .test-functions {
12
+ padding: 8px mod(18px, 5px) 1px calc(rem(15px, 6px) + 50%);
13
+ transform: rotate(mod(-140deg, -90deg));
14
+ top: round(15px, 4px);
15
+ right: round(nearest, 15px, 4px);
16
+ bottom: round(up, 15px, 7px);
17
+ left: round(down, 15px, 4px);
18
+ width: round(to-zero, 15px, 4px);
19
+ }
20
+
21
+ /* becomes */
22
+
23
+ .test-functions {
24
+ padding: 8px 3px 1px calc(3px + 50%);
25
+ transform: rotate(-50deg);
26
+ top: 16px;
27
+ right: 16px;
28
+ bottom: 21px;
29
+ left: 12px;
30
+ width: 12px;
31
+ }
32
+ ```
33
+
34
+ ## Usage
35
+
36
+ Add [PostCSS Stepped Value Functions] to your project:
37
+
38
+ ```bash
39
+ npm install postcss @csstools/postcss-stepped-value-functions --save-dev
40
+ ```
41
+
42
+ Use it as a [PostCSS] plugin:
43
+
44
+ ```js
45
+ const postcss = require('postcss');
46
+ const postcssSteppedValueFunctions = require('@csstools/postcss-stepped-value-functions');
47
+
48
+ postcss([
49
+ postcssSteppedValueFunctions(/* pluginOptions */)
50
+ ]).process(YOUR_CSS /*, processOptions */);
51
+ ```
52
+
53
+ [PostCSS Stepped Value Functions] runs in all Node environments, with special
54
+ instructions for:
55
+
56
+ | [Node](INSTALL.md#node) | [PostCSS CLI](INSTALL.md#postcss-cli) | [Webpack](INSTALL.md#webpack) | [Create React App](INSTALL.md#create-react-app) | [Gulp](INSTALL.md#gulp) | [Grunt](INSTALL.md#grunt) |
57
+ | --- | --- | --- | --- | --- | --- |
58
+
59
+ ## ⚠️ About custom properties
60
+
61
+ Given the dynamic nature of custom properties it's impossible to know what the variable value is which means the plugin can't compute a final value for the stylesheet.
62
+
63
+ Because of that, any usage that contains a `var` is skipped.
64
+
65
+ ## Options
66
+
67
+ ### preserve
68
+
69
+ The `preserve` option determines whether the original notation
70
+ is preserved. By default, it is not preserved.
71
+
72
+ ```js
73
+ postcssSteppedValueFunctions({ preserve: true })
74
+ ```
75
+
76
+ ```pcss
77
+ .test-functions {
78
+ padding: 8px mod(18px, 5px) 1px calc(rem(15px, 6px) + 50%);
79
+ transform: rotate(mod(-140deg, -90deg));
80
+ top: round(15px, 4px);
81
+ right: round(nearest, 15px, 4px);
82
+ bottom: round(up, 15px, 7px);
83
+ left: round(down, 15px, 4px);
84
+ width: round(to-zero, 15px, 4px);
85
+ }
86
+
87
+ /* becomes */
88
+
89
+ .test-functions {
90
+ padding: 8px 3px 1px calc(3px + 50%);
91
+ padding: 8px mod(18px, 5px) 1px calc(rem(15px, 6px) + 50%);
92
+ transform: rotate(-50deg);
93
+ transform: rotate(mod(-140deg, -90deg));
94
+ top: 16px;
95
+ top: round(15px, 4px);
96
+ right: 16px;
97
+ right: round(nearest, 15px, 4px);
98
+ bottom: 21px;
99
+ bottom: round(up, 15px, 7px);
100
+ left: 12px;
101
+ left: round(down, 15px, 4px);
102
+ width: 12px;
103
+ width: round(to-zero, 15px, 4px);
104
+ }
105
+ ```
106
+
107
+ ### onInvalid
108
+
109
+ `onInvalid` option allows you to assign the `warn` value so you can get warnings when the usage of the functions is wrong.
110
+
111
+ ```js
112
+ postcssSteppedValueFunctions({ onInvalid: 'warn' })
113
+ ```
114
+
115
+ ```pcss
116
+ .invalid {
117
+ font-size: mod(18px, 5rem);
118
+ }
119
+ ```
120
+
121
+ Will produce on the terminal:
122
+
123
+ ```bash
124
+ [postcss-stepped-value-functions]: Failed to transform mod(18px, 5rem) as the units don't match
125
+ ```
126
+
127
+ [cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test
128
+ [css-url]: https://cssdb.org/#stepped-value-functions
129
+ [discord]: https://discord.gg/bUadyRwkJS
130
+ [npm-url]: https://www.npmjs.com/package/@csstools/postcss-stepped-value-functions
131
+
132
+ [Gulp PostCSS]: https://github.com/postcss/gulp-postcss
133
+ [Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss
134
+ [PostCSS]: https://github.com/postcss/postcss
135
+ [PostCSS Loader]: https://github.com/postcss/postcss-loader
136
+ [PostCSS Stepped Value Functions]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-stepped-value-functions
137
+ [CSS Values 4]: https://www.w3.org/TR/css-values-4/#round-func
package/dist/index.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=e(require("postcss-value-parser"));function n(e,n,r,a){const o=[];let l=!1;if(e.nodes.forEach((e=>{"word"!==e.type?function(e){return"function"===e.type&&"var"===e.value}(e)&&(l=!0):o.push(e)})),l)return void u(n,r,`Failed to transform ${n.value} as variables can't be processed.`,a);if(2!==o.length)return void u(n,r,`Failed to transform ${n.value} as it's expecting 2 arguments instead of ${o.length}`,a);const i=t.default.unit(o[0].value),s=t.default.unit(o[1].value);if(i&&s){if(i.unit===s.unit)return[i,s];u(n,r,`Failed to transform ${n.value} as the units don't match`,a)}}function u(e,t,n,u){"warn"===u.onInvalid&&e.warn(t,n)}function r(e){delete e.nodes;const t=e;return t.type="word",t}var a;!function(e){e.Nearest="nearest",e.Up="up",e.Down="down",e.ToZero="to-zero"}(a||(a={}));const o=/^[a-z|-]+$/i;const l=e=>{const l=Object.assign({preserve:!1,onInvalid:""},e);return{postcssPlugin:"postcss-stepped-value-functions",Declaration(e,{result:i}){const s=["mod(","rem(","round("].some((t=>e.value.includes(t)));if(!e||!s)return;const c=e.clone();if(e.value.includes("mod(")){const e=function(e,u,a){const o=t.default(e.value);return o.walk((t=>{if("function"!==t.type||"mod"!==t.value)return;const o=n(t,e,u,a);if(!o)return;const[l,i]=o,s=Number(l.number),c=Number(i.number),d=(s%c+c)%c;"number"!=typeof d||isNaN(d)||(r(t).value=0===d?"0":`${d}${l.unit}`)})),o.toString()}(c,i,l);e&&(c.value=e)}if(c.value.includes("rem(")){const e=function(e,u,a){const o=t.default(e.value);return o.walk((t=>{if("function"!==t.type||"rem"!==t.value)return;const o=n(t,e,u,a);if(!o)return;const[l,i]=o,s=Number(l.number)%Number(i.number);("number"==typeof s||isNaN(s))&&(r(t).value=0===s?"0":`${s}${l.unit}`)})),o.toString()}(c,i,l);e&&(c.value=e)}if(c.value.includes("round(")){const e=function(e,n,l){const i=t.default(e.value);return i.walk((i=>{if("function"!==i.type||"round"!==i.value)return;if(3!==i.nodes.length&&5!==i.nodes.length)return void u(e,n,`Failed to transform ${e.value} as the amount of arguments isn't valid`,l);const s=i.nodes.filter((e=>"word"===e.type)),c=s[0].value;let d,f,v;if(o.test(c)){var m,p;if(!Object.values(a).includes(c))return void u(e,n,`Failed to transform ${e.value} as ${c} is not a valid rounding strategy.`,l);d=c,f=t.default.unit((null==s||null==(m=s[1])?void 0:m.value)||""),v=t.default.unit((null==s||null==(p=s[2])?void 0:p.value)||"")}else{var b,h;d=a.Nearest,f=t.default.unit((null==s||null==(b=s[0])?void 0:b.value)||""),v=t.default.unit((null==s||null==(h=s[1])?void 0:h.value)||"")}if(!f||!v)return;if(f.unit!==v.unit)return void u(e,n,`Failed to transform ${e.value} as the units don't match`,l);const N=Number(f.number),$=Number(v.number);let g;switch(d){case a.Down:g=Math.floor(N/$)*$;break;case a.Up:g=Math.ceil(N/$)*$;break;case a.ToZero:g=Math.trunc(N/$)*$;break;case a.Nearest:default:g=Math.round(N/$)*$}"number"!=typeof g||isNaN(g)||(r(i).value=0===g?"0":`${g}${f.unit}`)})),i.toString()}(c,i,l);e&&(c.value=e)}e.value!==c.value&&(l.preserve?e.cloneBefore({value:c.value}):e.value=c.value)}}};l.postcss=!0,module.exports=l;
@@ -0,0 +1,7 @@
1
+ import type { PluginCreator } from 'postcss';
2
+ export declare type pluginOptions = {
3
+ preserve?: boolean;
4
+ onInvalid?: string;
5
+ };
6
+ declare const creator: PluginCreator<pluginOptions>;
7
+ export default creator;
package/dist/index.mjs ADDED
@@ -0,0 +1 @@
1
+ import e from"postcss-value-parser";function n(n,u,r,o){const a=[];let l=!1;if(n.nodes.forEach((e=>{"word"!==e.type?function(e){return"function"===e.type&&"var"===e.value}(e)&&(l=!0):a.push(e)})),l)return void t(u,r,`Failed to transform ${u.value} as variables can't be processed.`,o);if(2!==a.length)return void t(u,r,`Failed to transform ${u.value} as it's expecting 2 arguments instead of ${a.length}`,o);const s=e.unit(a[0].value),i=e.unit(a[1].value);if(s&&i){if(s.unit===i.unit)return[s,i];t(u,r,`Failed to transform ${u.value} as the units don't match`,o)}}function t(e,n,t,u){"warn"===u.onInvalid&&e.warn(n,t)}function u(e){delete e.nodes;const n=e;return n.type="word",n}var r;!function(e){e.Nearest="nearest",e.Up="up",e.Down="down",e.ToZero="to-zero"}(r||(r={}));const o=/^[a-z|-]+$/i;const a=a=>{const l=Object.assign({preserve:!1,onInvalid:""},a);return{postcssPlugin:"postcss-stepped-value-functions",Declaration(a,{result:s}){const i=["mod(","rem(","round("].some((e=>a.value.includes(e)));if(!a||!i)return;const c=a.clone();if(a.value.includes("mod(")){const t=function(t,r,o){const a=e(t.value);return a.walk((e=>{if("function"!==e.type||"mod"!==e.value)return;const a=n(e,t,r,o);if(!a)return;const[l,s]=a,i=Number(l.number),c=Number(s.number),v=(i%c+c)%c;"number"!=typeof v||isNaN(v)||(u(e).value=0===v?"0":`${v}${l.unit}`)})),a.toString()}(c,s,l);t&&(c.value=t)}if(c.value.includes("rem(")){const t=function(t,r,o){const a=e(t.value);return a.walk((e=>{if("function"!==e.type||"rem"!==e.value)return;const a=n(e,t,r,o);if(!a)return;const[l,s]=a,i=Number(l.number)%Number(s.number);("number"==typeof i||isNaN(i))&&(u(e).value=0===i?"0":`${i}${l.unit}`)})),a.toString()}(c,s,l);t&&(c.value=t)}if(c.value.includes("round(")){const n=function(n,a,l){const s=e(n.value);return s.walk((s=>{if("function"!==s.type||"round"!==s.value)return;if(3!==s.nodes.length&&5!==s.nodes.length)return void t(n,a,`Failed to transform ${n.value} as the amount of arguments isn't valid`,l);const i=s.nodes.filter((e=>"word"===e.type)),c=i[0].value;let v,d,f;if(o.test(c)){var m,p;if(!Object.values(r).includes(c))return void t(n,a,`Failed to transform ${n.value} as ${c} is not a valid rounding strategy.`,l);v=c,d=e.unit((null==i||null==(m=i[1])?void 0:m.value)||""),f=e.unit((null==i||null==(p=i[2])?void 0:p.value)||"")}else{var b,h;v=r.Nearest,d=e.unit((null==i||null==(b=i[0])?void 0:b.value)||""),f=e.unit((null==i||null==(h=i[1])?void 0:h.value)||"")}if(!d||!f)return;if(d.unit!==f.unit)return void t(n,a,`Failed to transform ${n.value} as the units don't match`,l);const N=Number(d.number),$=Number(f.number);let g;switch(v){case r.Down:g=Math.floor(N/$)*$;break;case r.Up:g=Math.ceil(N/$)*$;break;case r.ToZero:g=Math.trunc(N/$)*$;break;case r.Nearest:default:g=Math.round(N/$)*$}"number"!=typeof g||isNaN(g)||(u(s).value=0===g?"0":`${g}${d.unit}`)})),s.toString()}(c,s,l);n&&(c.value=n)}a.value!==c.value&&(l.preserve?a.cloneBefore({value:c.value}):a.value=c.value)}}};a.postcss=!0;export{a as default};
package/dist/mod.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ import type { Declaration, Result } from 'postcss';
2
+ import { pluginOptions } from './index';
3
+ declare const modFunctionCheck = "mod(";
4
+ declare function transformModFunction(decl: Declaration, result: Result, options: pluginOptions): string | undefined;
5
+ export { modFunctionCheck, transformModFunction };
package/dist/rem.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ import type { Declaration, Result } from 'postcss';
2
+ import { pluginOptions } from './index';
3
+ declare const remFunctionCheck = "rem(";
4
+ declare function transformRemFunction(decl: Declaration, result: Result, options: pluginOptions): string | undefined;
5
+ export { remFunctionCheck, transformRemFunction };
@@ -0,0 +1,5 @@
1
+ import type { Declaration, Result } from 'postcss';
2
+ import { pluginOptions } from './index';
3
+ declare const roundFunctionCheck = "round(";
4
+ declare function transformRoundFunction(decl: Declaration, result: Result, options: pluginOptions): string | undefined;
5
+ export { roundFunctionCheck, transformRoundFunction };
@@ -0,0 +1,8 @@
1
+ import valueParser from 'postcss-value-parser';
2
+ import type { FunctionNode, Node, WordNode } from 'postcss-value-parser';
3
+ import type { Declaration, Result } from 'postcss';
4
+ import { pluginOptions } from './index';
5
+ export declare function isVarNode(node: Node): boolean;
6
+ export declare function validateArgumentsAndTypes(node: FunctionNode, decl: Declaration, result: Result, options: pluginOptions): valueParser.Dimension[] | undefined;
7
+ export declare function optionallyWarn(decl: Declaration, result: Result, message: string, options: pluginOptions): void;
8
+ export declare function functionNodeToWordNode(fn: FunctionNode): WordNode;
package/package.json ADDED
@@ -0,0 +1,82 @@
1
+ {
2
+ "name": "@csstools/postcss-stepped-value-functions",
3
+ "description": "Use round, rem and mod functions in CSS",
4
+ "version": "1.0.0",
5
+ "contributors": [
6
+ {
7
+ "name": "Antonio Laguna",
8
+ "email": "antonio@laguna.es",
9
+ "url": "https://antonio.laguna.es"
10
+ },
11
+ {
12
+ "name": "Romain Menke ",
13
+ "email": "romainmenke@gmail.com"
14
+ }
15
+ ],
16
+ "license": "CC0-1.0",
17
+ "funding": {
18
+ "type": "opencollective",
19
+ "url": "https://opencollective.com/csstools"
20
+ },
21
+ "engines": {
22
+ "node": "^12 || ^14 || >=16"
23
+ },
24
+ "main": "dist/index.cjs",
25
+ "module": "dist/index.mjs",
26
+ "types": "dist/index.d.ts",
27
+ "exports": {
28
+ ".": {
29
+ "import": "./dist/index.mjs",
30
+ "require": "./dist/index.cjs",
31
+ "default": "./dist/index.mjs"
32
+ }
33
+ },
34
+ "files": [
35
+ "CHANGELOG.md",
36
+ "LICENSE.md",
37
+ "README.md",
38
+ "dist"
39
+ ],
40
+ "dependencies": {
41
+ "postcss-value-parser": "^4.2.0"
42
+ },
43
+ "peerDependencies": {
44
+ "postcss": "^8.3"
45
+ },
46
+ "scripts": {
47
+ "build": "rollup -c ../../rollup/default.js",
48
+ "clean": "node -e \"fs.rmSync('./dist', { recursive: true, force: true });\"",
49
+ "docs": "node ../../.github/bin/generate-docs/install.mjs && node ../../.github/bin/generate-docs/readme.mjs",
50
+ "lint": "npm run lint:eslint && npm run lint:package-json",
51
+ "lint:eslint": "eslint ./src --ext .js --ext .ts --ext .mjs --no-error-on-unmatched-pattern",
52
+ "lint:package-json": "node ../../.github/bin/format-package-json.mjs",
53
+ "prepublishOnly": "npm run clean && npm run build && npm run test",
54
+ "test": "node .tape.mjs && npm run test:exports",
55
+ "test:exports": "node ./test/_import.mjs && node ./test/_require.cjs",
56
+ "test:rewrite-expects": "REWRITE_EXPECTS=true node .tape.mjs"
57
+ },
58
+ "homepage": "https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-stepped-value-functions#readme",
59
+ "repository": {
60
+ "type": "git",
61
+ "url": "https://github.com/csstools/postcss-plugins.git",
62
+ "directory": "plugins/postcss-stepped-value-functions"
63
+ },
64
+ "bugs": "https://github.com/csstools/postcss-plugins/issues",
65
+ "keywords": [
66
+ "css",
67
+ "modulus",
68
+ "postcss-plugin",
69
+ "remainder",
70
+ "round",
71
+ "stepped"
72
+ ],
73
+ "csstools": {
74
+ "cssdbId": "stepped-value-functions",
75
+ "exportName": "postcssSteppedValueFunctions",
76
+ "humanReadableName": "PostCSS Stepped Value Functions",
77
+ "specUrl": "https://www.w3.org/TR/css-values-4/#round-func"
78
+ },
79
+ "volta": {
80
+ "extends": "../../package.json"
81
+ }
82
+ }