diff --git a/README.md b/README.md index 9d8c357..ee733b6 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,8 @@ ✅ `.d.ts` generation for `.ts`, `.js` and `.vue` files +✅ Support [postcss](https://postcss.org/) ([autoprefixer](https://github.com/postcss/autoprefixer), [cssnano](https://cssnano.co/) and [postcss-nested](https://www.npmjs.com/package/postcss-nested) enabled out of the box!) + ## ❓ Why? Bundling libraries isn't always the best choice: @@ -39,14 +41,12 @@ npx mkdist [rootDir] [--src=src] [--dist=dist] [--pattern=glob [--pattern=more-g [MIT](./LICENSE) + [npm-version-src]: https://img.shields.io/npm/v/mkdist?style=flat-square [npm-version-href]: https://npmjs.com/package/mkdist - [npm-downloads-src]: https://img.shields.io/npm/dm/mkdist?style=flat-square [npm-downloads-href]: https://npmjs.com/package/mkdist - [github-actions-src]: https://img.shields.io/github/actions/workflow/status/unjs/mkdist/ci.yml?branch=main&style=flat-square [github-actions-href]: https://github.com/unjs/mkdist/actions?query=workflow%3Aci - [codecov-src]: https://img.shields.io/codecov/c/gh/unjs/mkdist/main?style=flat-square [codecov-href]: https://codecov.io/gh/unjs/mkdist diff --git a/package.json b/package.json index 5e7e199..3cb40a6 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,6 @@ "description": "Lightweight file-to-file transformer", "repository": "unjs/mkdist", "license": "MIT", - "main": "./dist/index.cjs", "exports": { ".": { "require": "./dist/index.cjs", @@ -12,6 +11,7 @@ "types": "./dist/index.d.ts" } }, + "main": "./dist/index.cjs", "types": "./dist/index.d.ts", "bin": { "mkdist": "./dist/cli.cjs" @@ -29,7 +29,9 @@ "test": "pnpm lint && vitest run --coverage" }, "dependencies": { + "autoprefixer": "^10.4.14", "citty": "^0.1.5", + "cssnano": "^6.0.1", "defu": "^6.1.3", "esbuild": "^0.19.7", "fs-extra": "^11.1.1", @@ -37,7 +39,9 @@ "jiti": "^1.21.0", "mlly": "^1.4.2", "mri": "^1.2.0", - "pathe": "^1.1.1" + "pathe": "^1.1.1", + "postcss": "^8.4.26", + "postcss-nested": "^6.0.1" }, "devDependencies": { "@types/fs-extra": "^11.0.4", @@ -68,4 +72,4 @@ } }, "packageManager": "pnpm@8.10.5" -} \ No newline at end of file +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5a9748f..515457d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,9 +5,15 @@ settings: excludeLinksFromLockfile: false dependencies: + autoprefixer: + specifier: ^10.4.14 + version: 10.4.16(postcss@8.4.31) citty: specifier: ^0.1.5 version: 0.1.5 + cssnano: + specifier: ^6.0.1 + version: 6.0.1(postcss@8.4.31) defu: specifier: ^6.1.3 version: 6.1.3 @@ -32,6 +38,12 @@ dependencies: pathe: specifier: ^1.1.1 version: 1.1.1 + postcss: + specifier: ^8.4.26 + version: 8.4.31 + postcss-nested: + specifier: ^6.0.1 + version: 6.0.1(postcss@8.4.31) devDependencies: '@types/fs-extra': @@ -233,6 +245,7 @@ packages: /@babel/highlight@7.23.4: resolution: {integrity: sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==} engines: {node: '>=6.9.0'} + requiresBuild: true dependencies: '@babel/helper-validator-identifier': 7.22.20 chalk: 2.4.2 @@ -776,6 +789,11 @@ packages: resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} dev: true + /@trysound/sax@0.2.0: + resolution: {integrity: sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==} + engines: {node: '>=10.13.0'} + dev: false + /@types/chai-subset@1.3.5: resolution: {integrity: sha512-c2mPnw+xHtXDoHmdtcCXGwyLMiauiAyxWMzhGpqHC4nqI/Y5G2XhTampslK2rb59kpcuHon03UH8W6iYUzw88A==} dependencies: @@ -1074,6 +1092,7 @@ packages: /ansi-styles@3.2.1: resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} engines: {node: '>=4'} + requiresBuild: true dependencies: color-convert: 1.9.3 dev: true @@ -1173,6 +1192,22 @@ packages: resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} dev: true + /autoprefixer@10.4.16(postcss@8.4.31): + resolution: {integrity: sha512-7vd3UC6xKp0HLfua5IjZlcXvGAGy7cBAXTg2lyQ/8WpNhd6SiZ8Be+xm3FyBSYJx5GKcpRCzBh7RH4/0dnY+uQ==} + engines: {node: ^10 || ^12 || >=14} + hasBin: true + peerDependencies: + postcss: ^8.1.0 + dependencies: + browserslist: 4.22.1 + caniuse-lite: 1.0.30001564 + fraction.js: 4.3.7 + normalize-range: 0.1.2 + picocolors: 1.0.0 + postcss: 8.4.31 + postcss-value-parser: 4.2.0 + dev: false + /available-typed-arrays@1.0.5: resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} engines: {node: '>= 0.4'} @@ -1192,6 +1227,10 @@ packages: engines: {node: '>=8'} dev: true + /boolbase@1.0.0: + resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} + dev: false + /bplist-parser@0.2.0: resolution: {integrity: sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==} engines: {node: '>= 5.10.0'} @@ -1227,7 +1266,6 @@ packages: electron-to-chromium: 1.4.590 node-releases: 2.0.13 update-browserslist-db: 1.0.13(browserslist@4.22.1) - dev: true /builtin-modules@3.3.0: resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} @@ -1302,9 +1340,17 @@ packages: engines: {node: '>=6'} dev: true + /caniuse-api@3.0.0: + resolution: {integrity: sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==} + dependencies: + browserslist: 4.22.1 + caniuse-lite: 1.0.30001564 + lodash.memoize: 4.1.2 + lodash.uniq: 4.5.0 + dev: false + /caniuse-lite@1.0.30001564: resolution: {integrity: sha512-DqAOf+rhof+6GVx1y+xzbFPeOumfQnhYzVnZD6LAXijR77yPtm9mfOcqOnT3mpnJiZVT+kwLAFnRlZcIz+c6bg==} - dev: true /chai@4.3.10: resolution: {integrity: sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g==} @@ -1322,6 +1368,7 @@ packages: /chalk@2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} engines: {node: '>=4'} + requiresBuild: true dependencies: ansi-styles: 3.2.1 escape-string-regexp: 1.0.5 @@ -1418,6 +1465,7 @@ packages: /color-convert@1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} + requiresBuild: true dependencies: color-name: 1.1.3 dev: true @@ -1431,16 +1479,26 @@ packages: /color-name@1.1.3: resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} + requiresBuild: true dev: true /color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} dev: true + /colord@2.9.3: + resolution: {integrity: sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==} + dev: false + /colorette@2.0.20: resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} dev: true + /commander@7.2.0: + resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==} + engines: {node: '>= 10'} + dev: false + /commondir@1.0.1: resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} dev: true @@ -1470,6 +1528,117 @@ packages: which: 2.0.2 dev: true + /css-declaration-sorter@6.4.1(postcss@8.4.31): + resolution: {integrity: sha512-rtdthzxKuyq6IzqX6jEcIzQF/YqccluefyCYheovBOLhFT/drQA9zj/UbRAa9J7C0o6EG6u3E6g+vKkay7/k3g==} + engines: {node: ^10 || ^12 || >=14} + peerDependencies: + postcss: ^8.0.9 + dependencies: + postcss: 8.4.31 + dev: false + + /css-select@5.1.0: + resolution: {integrity: sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==} + dependencies: + boolbase: 1.0.0 + css-what: 6.1.0 + domhandler: 5.0.3 + domutils: 3.1.0 + nth-check: 2.1.1 + dev: false + + /css-tree@2.2.1: + resolution: {integrity: sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA==} + engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0, npm: '>=7.0.0'} + dependencies: + mdn-data: 2.0.28 + source-map-js: 1.0.2 + dev: false + + /css-tree@2.3.1: + resolution: {integrity: sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==} + engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0} + dependencies: + mdn-data: 2.0.30 + source-map-js: 1.0.2 + dev: false + + /css-what@6.1.0: + resolution: {integrity: sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==} + engines: {node: '>= 6'} + dev: false + + /cssesc@3.0.0: + resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==} + engines: {node: '>=4'} + hasBin: true + dev: false + + /cssnano-preset-default@6.0.1(postcss@8.4.31): + resolution: {integrity: sha512-7VzyFZ5zEB1+l1nToKyrRkuaJIx0zi/1npjvZfbBwbtNTzhLtlvYraK/7/uqmX2Wb2aQtd983uuGw79jAjLSuQ==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.2.15 + dependencies: + css-declaration-sorter: 6.4.1(postcss@8.4.31) + cssnano-utils: 4.0.0(postcss@8.4.31) + postcss: 8.4.31 + postcss-calc: 9.0.1(postcss@8.4.31) + postcss-colormin: 6.0.0(postcss@8.4.31) + postcss-convert-values: 6.0.0(postcss@8.4.31) + postcss-discard-comments: 6.0.0(postcss@8.4.31) + postcss-discard-duplicates: 6.0.0(postcss@8.4.31) + postcss-discard-empty: 6.0.0(postcss@8.4.31) + postcss-discard-overridden: 6.0.0(postcss@8.4.31) + postcss-merge-longhand: 6.0.0(postcss@8.4.31) + postcss-merge-rules: 6.0.1(postcss@8.4.31) + postcss-minify-font-values: 6.0.0(postcss@8.4.31) + postcss-minify-gradients: 6.0.0(postcss@8.4.31) + postcss-minify-params: 6.0.0(postcss@8.4.31) + postcss-minify-selectors: 6.0.0(postcss@8.4.31) + postcss-normalize-charset: 6.0.0(postcss@8.4.31) + postcss-normalize-display-values: 6.0.0(postcss@8.4.31) + postcss-normalize-positions: 6.0.0(postcss@8.4.31) + postcss-normalize-repeat-style: 6.0.0(postcss@8.4.31) + postcss-normalize-string: 6.0.0(postcss@8.4.31) + postcss-normalize-timing-functions: 6.0.0(postcss@8.4.31) + postcss-normalize-unicode: 6.0.0(postcss@8.4.31) + postcss-normalize-url: 6.0.0(postcss@8.4.31) + postcss-normalize-whitespace: 6.0.0(postcss@8.4.31) + postcss-ordered-values: 6.0.0(postcss@8.4.31) + postcss-reduce-initial: 6.0.0(postcss@8.4.31) + postcss-reduce-transforms: 6.0.0(postcss@8.4.31) + postcss-svgo: 6.0.0(postcss@8.4.31) + postcss-unique-selectors: 6.0.0(postcss@8.4.31) + dev: false + + /cssnano-utils@4.0.0(postcss@8.4.31): + resolution: {integrity: sha512-Z39TLP+1E0KUcd7LGyF4qMfu8ZufI0rDzhdyAMsa/8UyNUU8wpS0fhdBxbQbv32r64ea00h4878gommRVg2BHw==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.2.15 + dependencies: + postcss: 8.4.31 + dev: false + + /cssnano@6.0.1(postcss@8.4.31): + resolution: {integrity: sha512-fVO1JdJ0LSdIGJq68eIxOqFpIJrZqXUsBt8fkrBcztCQqAjQD51OhZp7tc0ImcbwXD4k7ny84QTV90nZhmqbkg==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.2.15 + dependencies: + cssnano-preset-default: 6.0.1(postcss@8.4.31) + lilconfig: 2.1.0 + postcss: 8.4.31 + dev: false + + /csso@5.0.5: + resolution: {integrity: sha512-0LrrStPOdJj+SPCCrGhzryycLjwcgUSHBtxNA8aIDxf0GLsRh1cKYhB00Gd1lDOS4yGH69+SNn13+TWbVHETFQ==} + engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0, npm: '>=7.0.0'} + dependencies: + css-tree: 2.2.1 + dev: false + /debug@3.2.7: resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} peerDependencies: @@ -1582,6 +1751,33 @@ packages: esutils: 2.0.3 dev: true + /dom-serializer@2.0.0: + resolution: {integrity: sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==} + dependencies: + domelementtype: 2.3.0 + domhandler: 5.0.3 + entities: 4.5.0 + dev: false + + /domelementtype@2.3.0: + resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==} + dev: false + + /domhandler@5.0.3: + resolution: {integrity: sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==} + engines: {node: '>= 4'} + dependencies: + domelementtype: 2.3.0 + dev: false + + /domutils@3.1.0: + resolution: {integrity: sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==} + dependencies: + dom-serializer: 2.0.0 + domelementtype: 2.3.0 + domhandler: 5.0.3 + dev: false + /dotenv@16.3.1: resolution: {integrity: sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==} engines: {node: '>=12'} @@ -1589,7 +1785,6 @@ packages: /electron-to-chromium@1.4.590: resolution: {integrity: sha512-hohItzsQcG7/FBsviCYMtQwUSWvVF7NVqPOnJCErWsAshsP/CR2LAXdmq276RbESNdhxiAq5/vRo1g2pxGXVww==} - dev: true /emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} @@ -1603,6 +1798,11 @@ packages: tapable: 2.2.1 dev: true + /entities@4.5.0: + resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} + engines: {node: '>=0.12'} + dev: false + /error-ex@1.3.2: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} dependencies: @@ -1710,7 +1910,6 @@ packages: /escalade@3.1.1: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} engines: {node: '>=6'} - dev: true /escape-string-regexp@1.0.5: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} @@ -2223,6 +2422,10 @@ packages: signal-exit: 3.0.7 dev: true + /fraction.js@4.3.7: + resolution: {integrity: sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==} + dev: false + /fs-extra@11.1.1: resolution: {integrity: sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==} engines: {node: '>=14.14'} @@ -2426,6 +2629,7 @@ packages: /has-flag@3.0.0: resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} engines: {node: '>=4'} + requiresBuild: true dev: true /has-flag@4.0.0: @@ -2775,6 +2979,7 @@ packages: /js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + requiresBuild: true dev: true /js-yaml@4.1.0: @@ -2854,6 +3059,11 @@ packages: type-check: 0.4.0 dev: true + /lilconfig@2.1.0: + resolution: {integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==} + engines: {node: '>=10'} + dev: false + /lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} dev: true @@ -2877,10 +3087,18 @@ packages: p-locate: 5.0.0 dev: true + /lodash.memoize@4.1.2: + resolution: {integrity: sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==} + dev: false + /lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} dev: true + /lodash.uniq@4.5.0: + resolution: {integrity: sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==} + dev: false + /lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} dev: true @@ -2918,6 +3136,14 @@ packages: semver: 7.5.4 dev: true + /mdn-data@2.0.28: + resolution: {integrity: sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g==} + dev: false + + /mdn-data@2.0.30: + resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==} + dev: false + /merge-stream@2.0.0: resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} dev: true @@ -3045,7 +3271,6 @@ packages: resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true - dev: true /natural-compare-lite@1.4.0: resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==} @@ -3061,7 +3286,6 @@ packages: /node-releases@2.0.13: resolution: {integrity: sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==} - dev: true /normalize-package-data@2.5.0: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} @@ -3077,6 +3301,11 @@ packages: engines: {node: '>=0.10.0'} dev: true + /normalize-range@0.1.2: + resolution: {integrity: sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==} + engines: {node: '>=0.10.0'} + dev: false + /npm-run-path@4.0.1: resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} engines: {node: '>=8'} @@ -3091,6 +3320,12 @@ packages: path-key: 4.0.0 dev: true + /nth-check@2.1.1: + resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} + dependencies: + boolbase: 1.0.0 + dev: false + /object-inspect@1.13.1: resolution: {integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==} dev: true @@ -3289,7 +3524,6 @@ packages: /picocolors@1.0.0: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} - dev: true /picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} @@ -3307,6 +3541,310 @@ packages: engines: {node: '>=4'} dev: true + /postcss-calc@9.0.1(postcss@8.4.31): + resolution: {integrity: sha512-TipgjGyzP5QzEhsOZUaIkeO5mKeMFpebWzRogWG/ysonUlnHcq5aJe0jOjpfzUU8PeSaBQnrE8ehR0QA5vs8PQ==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.2.2 + dependencies: + postcss: 8.4.31 + postcss-selector-parser: 6.0.13 + postcss-value-parser: 4.2.0 + dev: false + + /postcss-colormin@6.0.0(postcss@8.4.31): + resolution: {integrity: sha512-EuO+bAUmutWoZYgHn2T1dG1pPqHU6L4TjzPlu4t1wZGXQ/fxV16xg2EJmYi0z+6r+MGV1yvpx1BHkUaRrPa2bw==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.2.15 + dependencies: + browserslist: 4.22.1 + caniuse-api: 3.0.0 + colord: 2.9.3 + postcss: 8.4.31 + postcss-value-parser: 4.2.0 + dev: false + + /postcss-convert-values@6.0.0(postcss@8.4.31): + resolution: {integrity: sha512-U5D8QhVwqT++ecmy8rnTb+RL9n/B806UVaS3m60lqle4YDFcpbS3ae5bTQIh3wOGUSDHSEtMYLs/38dNG7EYFw==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.2.15 + dependencies: + browserslist: 4.22.1 + postcss: 8.4.31 + postcss-value-parser: 4.2.0 + dev: false + + /postcss-discard-comments@6.0.0(postcss@8.4.31): + resolution: {integrity: sha512-p2skSGqzPMZkEQvJsgnkBhCn8gI7NzRH2683EEjrIkoMiwRELx68yoUJ3q3DGSGuQ8Ug9Gsn+OuDr46yfO+eFw==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.2.15 + dependencies: + postcss: 8.4.31 + dev: false + + /postcss-discard-duplicates@6.0.0(postcss@8.4.31): + resolution: {integrity: sha512-bU1SXIizMLtDW4oSsi5C/xHKbhLlhek/0/yCnoMQany9k3nPBq+Ctsv/9oMmyqbR96HYHxZcHyK2HR5P/mqoGA==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.2.15 + dependencies: + postcss: 8.4.31 + dev: false + + /postcss-discard-empty@6.0.0(postcss@8.4.31): + resolution: {integrity: sha512-b+h1S1VT6dNhpcg+LpyiUrdnEZfICF0my7HAKgJixJLW7BnNmpRH34+uw/etf5AhOlIhIAuXApSzzDzMI9K/gQ==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.2.15 + dependencies: + postcss: 8.4.31 + dev: false + + /postcss-discard-overridden@6.0.0(postcss@8.4.31): + resolution: {integrity: sha512-4VELwssYXDFigPYAZ8vL4yX4mUepF/oCBeeIT4OXsJPYOtvJumyz9WflmJWTfDwCUcpDR+z0zvCWBXgTx35SVw==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.2.15 + dependencies: + postcss: 8.4.31 + dev: false + + /postcss-merge-longhand@6.0.0(postcss@8.4.31): + resolution: {integrity: sha512-4VSfd1lvGkLTLYcxFuISDtWUfFS4zXe0FpF149AyziftPFQIWxjvFSKhA4MIxMe4XM3yTDgQMbSNgzIVxChbIg==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.2.15 + dependencies: + postcss: 8.4.31 + postcss-value-parser: 4.2.0 + stylehacks: 6.0.0(postcss@8.4.31) + dev: false + + /postcss-merge-rules@6.0.1(postcss@8.4.31): + resolution: {integrity: sha512-a4tlmJIQo9SCjcfiCcCMg/ZCEe0XTkl/xK0XHBs955GWg9xDX3NwP9pwZ78QUOWB8/0XCjZeJn98Dae0zg6AAw==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.2.15 + dependencies: + browserslist: 4.22.1 + caniuse-api: 3.0.0 + cssnano-utils: 4.0.0(postcss@8.4.31) + postcss: 8.4.31 + postcss-selector-parser: 6.0.13 + dev: false + + /postcss-minify-font-values@6.0.0(postcss@8.4.31): + resolution: {integrity: sha512-zNRAVtyh5E8ndZEYXA4WS8ZYsAp798HiIQ1V2UF/C/munLp2r1UGHwf1+6JFu7hdEhJFN+W1WJQKBrtjhFgEnA==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.2.15 + dependencies: + postcss: 8.4.31 + postcss-value-parser: 4.2.0 + dev: false + + /postcss-minify-gradients@6.0.0(postcss@8.4.31): + resolution: {integrity: sha512-wO0F6YfVAR+K1xVxF53ueZJza3L+R3E6cp0VwuXJQejnNUH0DjcAFe3JEBeTY1dLwGa0NlDWueCA1VlEfiKgAA==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.2.15 + dependencies: + colord: 2.9.3 + cssnano-utils: 4.0.0(postcss@8.4.31) + postcss: 8.4.31 + postcss-value-parser: 4.2.0 + dev: false + + /postcss-minify-params@6.0.0(postcss@8.4.31): + resolution: {integrity: sha512-Fz/wMQDveiS0n5JPcvsMeyNXOIMrwF88n7196puSuQSWSa+/Ofc1gDOSY2xi8+A4PqB5dlYCKk/WfqKqsI+ReQ==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.2.15 + dependencies: + browserslist: 4.22.1 + cssnano-utils: 4.0.0(postcss@8.4.31) + postcss: 8.4.31 + postcss-value-parser: 4.2.0 + dev: false + + /postcss-minify-selectors@6.0.0(postcss@8.4.31): + resolution: {integrity: sha512-ec/q9JNCOC2CRDNnypipGfOhbYPuUkewGwLnbv6omue/PSASbHSU7s6uSQ0tcFRVv731oMIx8k0SP4ZX6be/0g==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.2.15 + dependencies: + postcss: 8.4.31 + postcss-selector-parser: 6.0.13 + dev: false + + /postcss-nested@6.0.1(postcss@8.4.31): + resolution: {integrity: sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==} + engines: {node: '>=12.0'} + peerDependencies: + postcss: ^8.2.14 + dependencies: + postcss: 8.4.31 + postcss-selector-parser: 6.0.13 + dev: false + + /postcss-normalize-charset@6.0.0(postcss@8.4.31): + resolution: {integrity: sha512-cqundwChbu8yO/gSWkuFDmKrCZ2vJzDAocheT2JTd0sFNA4HMGoKMfbk2B+J0OmO0t5GUkiAkSM5yF2rSLUjgQ==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.2.15 + dependencies: + postcss: 8.4.31 + dev: false + + /postcss-normalize-display-values@6.0.0(postcss@8.4.31): + resolution: {integrity: sha512-Qyt5kMrvy7dJRO3OjF7zkotGfuYALETZE+4lk66sziWSPzlBEt7FrUshV6VLECkI4EN8Z863O6Nci4NXQGNzYw==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.2.15 + dependencies: + postcss: 8.4.31 + postcss-value-parser: 4.2.0 + dev: false + + /postcss-normalize-positions@6.0.0(postcss@8.4.31): + resolution: {integrity: sha512-mPCzhSV8+30FZyWhxi6UoVRYd3ZBJgTRly4hOkaSifo0H+pjDYcii/aVT4YE6QpOil15a5uiv6ftnY3rm0igPg==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.2.15 + dependencies: + postcss: 8.4.31 + postcss-value-parser: 4.2.0 + dev: false + + /postcss-normalize-repeat-style@6.0.0(postcss@8.4.31): + resolution: {integrity: sha512-50W5JWEBiOOAez2AKBh4kRFm2uhrT3O1Uwdxz7k24aKtbD83vqmcVG7zoIwo6xI2FZ/HDlbrCopXhLeTpQib1A==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.2.15 + dependencies: + postcss: 8.4.31 + postcss-value-parser: 4.2.0 + dev: false + + /postcss-normalize-string@6.0.0(postcss@8.4.31): + resolution: {integrity: sha512-KWkIB7TrPOiqb8ZZz6homet2KWKJwIlysF5ICPZrXAylGe2hzX/HSf4NTX2rRPJMAtlRsj/yfkrWGavFuB+c0w==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.2.15 + dependencies: + postcss: 8.4.31 + postcss-value-parser: 4.2.0 + dev: false + + /postcss-normalize-timing-functions@6.0.0(postcss@8.4.31): + resolution: {integrity: sha512-tpIXWciXBp5CiFs8sem90IWlw76FV4oi6QEWfQwyeREVwUy39VSeSqjAT7X0Qw650yAimYW5gkl2Gd871N5SQg==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.2.15 + dependencies: + postcss: 8.4.31 + postcss-value-parser: 4.2.0 + dev: false + + /postcss-normalize-unicode@6.0.0(postcss@8.4.31): + resolution: {integrity: sha512-ui5crYkb5ubEUDugDc786L/Me+DXp2dLg3fVJbqyAl0VPkAeALyAijF2zOsnZyaS1HyfPuMH0DwyY18VMFVNkg==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.2.15 + dependencies: + browserslist: 4.22.1 + postcss: 8.4.31 + postcss-value-parser: 4.2.0 + dev: false + + /postcss-normalize-url@6.0.0(postcss@8.4.31): + resolution: {integrity: sha512-98mvh2QzIPbb02YDIrYvAg4OUzGH7s1ZgHlD3fIdTHLgPLRpv1ZTKJDnSAKr4Rt21ZQFzwhGMXxpXlfrUBKFHw==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.2.15 + dependencies: + postcss: 8.4.31 + postcss-value-parser: 4.2.0 + dev: false + + /postcss-normalize-whitespace@6.0.0(postcss@8.4.31): + resolution: {integrity: sha512-7cfE1AyLiK0+ZBG6FmLziJzqQCpTQY+8XjMhMAz8WSBSCsCNNUKujgIgjCAmDT3cJ+3zjTXFkoD15ZPsckArVw==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.2.15 + dependencies: + postcss: 8.4.31 + postcss-value-parser: 4.2.0 + dev: false + + /postcss-ordered-values@6.0.0(postcss@8.4.31): + resolution: {integrity: sha512-K36XzUDpvfG/nWkjs6d1hRBydeIxGpKS2+n+ywlKPzx1nMYDYpoGbcjhj5AwVYJK1qV2/SDoDEnHzlPD6s3nMg==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.2.15 + dependencies: + cssnano-utils: 4.0.0(postcss@8.4.31) + postcss: 8.4.31 + postcss-value-parser: 4.2.0 + dev: false + + /postcss-reduce-initial@6.0.0(postcss@8.4.31): + resolution: {integrity: sha512-s2UOnidpVuXu6JiiI5U+fV2jamAw5YNA9Fdi/GRK0zLDLCfXmSGqQtzpUPtfN66RtCbb9fFHoyZdQaxOB3WxVA==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.2.15 + dependencies: + browserslist: 4.22.1 + caniuse-api: 3.0.0 + postcss: 8.4.31 + dev: false + + /postcss-reduce-transforms@6.0.0(postcss@8.4.31): + resolution: {integrity: sha512-FQ9f6xM1homnuy1wLe9lP1wujzxnwt1EwiigtWwuyf8FsqqXUDUp2Ulxf9A5yjlUOTdCJO6lonYjg1mgqIIi2w==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.2.15 + dependencies: + postcss: 8.4.31 + postcss-value-parser: 4.2.0 + dev: false + + /postcss-selector-parser@6.0.13: + resolution: {integrity: sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==} + engines: {node: '>=4'} + dependencies: + cssesc: 3.0.0 + util-deprecate: 1.0.2 + dev: false + + /postcss-svgo@6.0.0(postcss@8.4.31): + resolution: {integrity: sha512-r9zvj/wGAoAIodn84dR/kFqwhINp5YsJkLoujybWG59grR/IHx+uQ2Zo+IcOwM0jskfYX3R0mo+1Kip1VSNcvw==} + engines: {node: ^14 || ^16 || >= 18} + peerDependencies: + postcss: ^8.2.15 + dependencies: + postcss: 8.4.31 + postcss-value-parser: 4.2.0 + svgo: 3.0.4 + dev: false + + /postcss-unique-selectors@6.0.0(postcss@8.4.31): + resolution: {integrity: sha512-EPQzpZNxOxP7777t73RQpZE5e9TrnCrkvp7AH7a0l89JmZiPnS82y216JowHXwpBCQitfyxrof9TK3rYbi7/Yw==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.2.15 + dependencies: + postcss: 8.4.31 + postcss-selector-parser: 6.0.13 + dev: false + + /postcss-value-parser@4.2.0: + resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} + dev: false + /postcss@8.4.31: resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==} engines: {node: ^10 || ^12 || >=14} @@ -3314,7 +3852,6 @@ packages: nanoid: 3.3.7 picocolors: 1.0.0 source-map-js: 1.0.2 - dev: true /prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} @@ -3621,7 +4158,6 @@ packages: /source-map-js@1.0.2: resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} engines: {node: '>=0.10.0'} - dev: true /source-map@0.6.1: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} @@ -3732,9 +4268,21 @@ packages: acorn: 8.11.2 dev: true + /stylehacks@6.0.0(postcss@8.4.31): + resolution: {integrity: sha512-+UT589qhHPwz6mTlCLSt/vMNTJx8dopeJlZAlBMJPWA3ORqu6wmQY7FBXf+qD+FsqoBJODyqNxOUP3jdntFRdw==} + engines: {node: ^14 || ^16 || >=18.0} + peerDependencies: + postcss: ^8.2.15 + dependencies: + browserslist: 4.22.1 + postcss: 8.4.31 + postcss-selector-parser: 6.0.13 + dev: false + /supports-color@5.5.0: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} engines: {node: '>=4'} + requiresBuild: true dependencies: has-flag: 3.0.0 dev: true @@ -3751,6 +4299,20 @@ packages: engines: {node: '>= 0.4'} dev: true + /svgo@3.0.4: + resolution: {integrity: sha512-T+Xul3JwuJ6VGXKo/p2ndqx1ibxNKnLTvRc1ZTWKCfyKS/GgNjRZcYsK84fxTsy/izr91g/Rwx6fGnVgaFSI5g==} + engines: {node: '>=14.0.0'} + hasBin: true + dependencies: + '@trysound/sax': 0.2.0 + commander: 7.2.0 + css-select: 5.1.0 + css-tree: 2.3.1 + css-what: 6.1.0 + csso: 5.0.5 + picocolors: 1.0.0 + dev: false + /tapable@2.2.1: resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} engines: {node: '>=6'} @@ -3993,7 +4555,6 @@ packages: browserslist: 4.22.1 escalade: 3.1.1 picocolors: 1.0.0 - dev: true /uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} @@ -4001,6 +4562,10 @@ packages: punycode: 2.3.1 dev: true + /util-deprecate@1.0.2: + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + dev: false + /v8-to-istanbul@9.2.0: resolution: {integrity: sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==} engines: {node: '>=10.12.0'} diff --git a/src/loader.ts b/src/loader.ts index b398af8..29b0545 100644 --- a/src/loader.ts +++ b/src/loader.ts @@ -1,4 +1,11 @@ import type { CommonOptions } from "esbuild"; +import type { + AcceptedPlugin as PostcssPlugin, + ProcessOptions as PostcssProcessOptions, +} from "postcss"; +import type { Options as PostcssNestedOptions } from "postcss-nested"; +import type { Options as AutoprefixerOptions } from "autoprefixer"; +import type { Options as CssnanoOptions } from "cssnano"; import { LoaderName, resolveLoaders } from "./loaders"; export interface InputFile { @@ -32,6 +39,15 @@ export interface LoaderOptions { format?: "cjs" | "esm"; declaration?: boolean; esbuild?: CommonOptions; + postcss?: + | false + | { + nested?: false | PostcssNestedOptions; + autoprefixer?: false | AutoprefixerOptions; + cssnano?: false | CssnanoOptions; + plugins?: PostcssPlugin[]; + processOptions?: Omit; + }; } export interface LoaderContext { diff --git a/src/loaders/index.ts b/src/loaders/index.ts index dbd573e..7ea0633 100644 --- a/src/loaders/index.ts +++ b/src/loaders/index.ts @@ -2,16 +2,18 @@ import type { Loader } from "../loader"; import { jsLoader } from "./js"; import { vueLoader } from "./vue"; import { sassLoader } from "./sass"; +import { postcssLoader } from "./postcss"; export const loaders = { js: jsLoader, vue: vueLoader, sass: sassLoader, + postcss: postcssLoader, }; export type LoaderName = keyof typeof loaders; -export const defaultLoaders: LoaderName[] = ["js", "vue", "sass"]; +export const defaultLoaders: LoaderName[] = ["js", "vue", "sass", "postcss"]; export function resolveLoader(loader: LoaderName | Loader) { if (typeof loader === "string") { @@ -23,5 +25,13 @@ export function resolveLoader(loader: LoaderName | Loader) { export function resolveLoaders( loaders: (LoaderName | Loader)[] = defaultLoaders, ) { - return loaders.map((loader) => resolveLoader(loader)).filter(Boolean); + return loaders + .map((loaderName) => { + const _loader = resolveLoader(loaderName); + if (!_loader) { + console.warn("Unknown loader:", loaderName); + } + return _loader; + }) + .filter(Boolean) as Loader[]; } diff --git a/src/loaders/postcss.ts b/src/loaders/postcss.ts new file mode 100644 index 0000000..59e9a1a --- /dev/null +++ b/src/loaders/postcss.ts @@ -0,0 +1,40 @@ +import cssnano from "cssnano"; +import autoprefixer from "autoprefixer"; +import postcss from "postcss"; +import postcssNested from "postcss-nested"; +import type { Loader, LoaderResult } from "../loader"; + +export interface PostcssLoaderOptions {} + +export const postcssLoader: Loader = async (input, ctx) => { + if (ctx.options.postcss === false || ![".css"].includes(input.extension)) { + return; + } + + const output: LoaderResult = []; + + const contents = await input.getContents(); + + const transformed = await postcss( + [ + ctx.options.postcss?.nested !== false && + postcssNested(ctx.options.postcss?.nested), + ctx.options.postcss?.autoprefixer !== false && + autoprefixer(ctx.options.postcss?.autoprefixer), + ctx.options.postcss?.cssnano !== false && + cssnano(ctx.options.postcss?.cssnano), + ...(ctx.options.postcss?.plugins || []), + ].filter(Boolean), + ).process(contents, { + ...ctx.options.postcss?.processOptions, + from: input.srcPath, + }); + + output.push({ + contents: transformed.content, + path: input.path, + extension: ".css", + }); + + return output; +}; diff --git a/src/loaders/vue.ts b/src/loaders/vue.ts index f5b64ec..db4ac9c 100644 --- a/src/loaders/vue.ts +++ b/src/loaders/vue.ts @@ -14,7 +14,7 @@ export const vueLoader: Loader = async (input, context) => { let earlyReturn = true; - for (const blockLoader of [sassLoader, scriptLoader]) { + for (const blockLoader of [styleLoader, scriptLoader]) { const result = await blockLoader( { ...input, getContents: () => output[0].contents }, context, @@ -105,7 +105,7 @@ const vueBlockLoader = ]; }; -const sassLoader = vueBlockLoader({ +const styleLoader = vueBlockLoader({ outputLang: "css", type: "style", }); diff --git a/test/fixture/src/components/blank.vue b/test/fixture/src/components/blank.vue index 8a27d5b..293929d 100644 --- a/test/fixture/src/components/blank.vue +++ b/test/fixture/src/components/blank.vue @@ -1,3 +1,11 @@ + + diff --git a/test/fixture/src/nested.css b/test/fixture/src/nested.css new file mode 100644 index 0000000..8db81d9 --- /dev/null +++ b/test/fixture/src/nested.css @@ -0,0 +1,5 @@ +#main { + .foo { + color: --var-red; + } +} diff --git a/test/index.test.ts b/test/index.test.ts index 90ecf91..e1b63a2 100644 --- a/test/index.test.ts +++ b/test/index.test.ts @@ -28,6 +28,7 @@ describe("mkdist", () => { "dist/bar/esm.mjs", "dist/ts/test1.mjs", "dist/ts/test2.mjs", + "dist/nested.css", ] .map((f) => resolve(rootDir, f)) .sort(), @@ -111,6 +112,7 @@ describe("mkdist", () => { "dist/ts/test2.mjs", "dist/ts/test1.d.mts", "dist/ts/test2.d.cts", + "dist/nested.css", ] .map((f) => resolve(rootDir, f)) .sort(), @@ -188,6 +190,7 @@ describe("mkdist", () => { "dist/bar/esm.mjs", "dist/ts/test1.mjs", "dist/ts/test2.mjs", + "dist/nested.css", ] .map((f) => resolve(rootDir, f)) .sort(),