diff options
Diffstat (limited to 'node_modules/postcss-normalize-charset')
6 files changed, 0 insertions, 172 deletions
diff --git a/node_modules/postcss-normalize-charset/LICENSE b/node_modules/postcss-normalize-charset/LICENSE deleted file mode 100644 index 066ee676..00000000 --- a/node_modules/postcss-normalize-charset/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright 2015 Bogdan Chadkin <trysound@yandex.ru> - -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: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -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. diff --git a/node_modules/postcss-normalize-charset/README.md b/node_modules/postcss-normalize-charset/README.md deleted file mode 100644 index 51f30601..00000000 --- a/node_modules/postcss-normalize-charset/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# postcss-normalize-charset - -Add necessary or remove extra charset with PostCSS - -```css -a{ - content: "©"; -} -``` - -```css -@charset "utf-8"; -a{ - content: "©"; -} -``` - -## API - -### normalizeCharset([options]) - -#### options - -##### add - -Type: `boolean` -Default: `true` - -Pass `false` to stop the module from adding a `@charset` declaration if it was -missing from the file (and the file contained non-ascii characters). - -## Usage - -See the [PostCSS documentation](https://github.com/postcss/postcss#usage) for -examples for your environment. - -## Contributors - -See [CONTRIBUTORS.md](https://github.com/cssnano/cssnano/blob/master/CONTRIBUTORS.md). - -## License - -MIT © [Bogdan Chadkin](mailto:trysound@yandex.ru) diff --git a/node_modules/postcss-normalize-charset/package.json b/node_modules/postcss-normalize-charset/package.json deleted file mode 100644 index 9dd790af..00000000 --- a/node_modules/postcss-normalize-charset/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "postcss-normalize-charset", - "version": "6.0.2", - "description": "Add necessary or remove extra charset with PostCSS", - "keywords": [ - "postcss", - "css", - "postcss-plugin", - "charset" - ], - "author": "Bogdan Chadkin <trysound@yandex.ru>", - "files": [ - "src", - "LICENSE", - "types" - ], - "license": "MIT", - "repository": "cssnano/cssnano", - "bugs": { - "url": "https://github.com/cssnano/cssnano/issues" - }, - "homepage": "https://github.com/cssnano/cssnano", - "main": "src/index.js", - "types": "types/index.d.ts", - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "devDependencies": { - "postcss": "^8.4.35" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } -}
\ No newline at end of file diff --git a/node_modules/postcss-normalize-charset/src/index.js b/node_modules/postcss-normalize-charset/src/index.js deleted file mode 100644 index eb8cde80..00000000 --- a/node_modules/postcss-normalize-charset/src/index.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict'; -const charset = 'charset'; -// eslint-disable-next-line no-control-regex -const nonAscii = /[^\x00-\x7F]/; - -/** - * @typedef {{add?: boolean}} Options - */ -/** - * @type {import('postcss').PluginCreator<Options>} - * @param {Options} opts - * @return {import('postcss').Plugin} - */ -function pluginCreator(opts = {}) { - return { - postcssPlugin: 'postcss-normalize-' + charset, - - OnceExit(css, { AtRule }) { - /** @type {import('postcss').AtRule | undefined} */ - let charsetRule; - /** @type {import('postcss').Node | undefined} */ - let nonAsciiNode; - - css.walk((node) => { - if (node.type === 'atrule' && node.name === charset) { - if (!charsetRule) { - charsetRule = node; - } - node.remove(); - } else if ( - !nonAsciiNode && - node.parent === css && - nonAscii.test(node.toString()) - ) { - nonAsciiNode = node; - } - }); - - if (nonAsciiNode) { - if (!charsetRule && opts.add !== false) { - charsetRule = new AtRule({ - name: charset, - params: '"utf-8"', - }); - } - if (charsetRule) { - charsetRule.source = nonAsciiNode.source; - css.prepend(charsetRule); - } - } - }, - }; -} - -pluginCreator.postcss = true; -module.exports = pluginCreator; diff --git a/node_modules/postcss-normalize-charset/types/index.d.ts b/node_modules/postcss-normalize-charset/types/index.d.ts deleted file mode 100644 index cd3cc25d..00000000 --- a/node_modules/postcss-normalize-charset/types/index.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export = pluginCreator; -/** - * @typedef {{add?: boolean}} Options - */ -/** - * @type {import('postcss').PluginCreator<Options>} - * @param {Options} opts - * @return {import('postcss').Plugin} - */ -declare function pluginCreator(opts?: Options): import('postcss').Plugin; -declare namespace pluginCreator { - export { postcss, Options }; -} -type Options = { - add?: boolean; -}; -declare var postcss: true; -//# sourceMappingURL=index.d.ts.map
\ No newline at end of file diff --git a/node_modules/postcss-normalize-charset/types/index.d.ts.map b/node_modules/postcss-normalize-charset/types/index.d.ts.map deleted file mode 100644 index a47d61b4..00000000 --- a/node_modules/postcss-normalize-charset/types/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":";AAKA;;GAEG;AACH;;;;GAIG;AACH,sCAHW,OAAO,GACN,OAAO,SAAS,EAAE,MAAM,CAyCnC;;;;eA9CY;IAAC,GAAG,CAAC,EAAE,OAAO,CAAA;CAAC"}
\ No newline at end of file |
