{"maintainers":[{"name":"geelen","email":"hi@glenmaddern.com"},{"name":"trysound","email":"trysound@yandex.ru"}],"keywords":["css","modules","icss","postcss"],"dist-tags":{"latest":"3.0.1"},"author":{"name":"Glen Maddern"},"description":"ICSS utils for postcss ast","readme":"[![Build Status](https://travis-ci.org/css-modules/icss-utils.svg)](https://travis-ci.org/css-modules/icss-utils)\r\n\r\n# ICSS Utils \r\n\r\n## replaceSymbols\r\n\r\nGoverns the way tokens are searched & replaced during the linking stage of ICSS loading.\r\n\r\nThis is broken into its own module in case the behaviour needs to be replicated in other PostCSS plugins\r\n(i.e. [CSS Modules Values](https://github.com/css-modules/postcss-modules-values))\r\n\r\n```js\r\nimport { replaceSymbols, replaceValueSymbols } from \"icss-utils\"\r\nreplaceSymbols(css, replacements)\r\nreplaceValueSymbols(string, replacements)\r\n```\r\n\r\nWhere:\r\n\r\n- `css` is the PostCSS tree you're working with\r\n- `replacements` is an JS object of `symbol: \"replacement\"` pairs, where all occurrences of `symbol` are replaced with `replacement`.\r\n\r\nA symbol is a string of alphanumeric, `-` or `_` characters. A replacement can be any string. They are replaced in the following places:\r\n\r\n- In the value of a declaration, i.e. `color: my_symbol;` or `box-shadow: 0 0 blur spread shadow-color`\r\n- In a media expression i.e. `@media small {}` or `@media screen and not-large {}`\r\n\r\n## extractICSS(css, removeRules = true)\r\n\r\nExtracts and remove (if removeRules is equal true) from PostCSS tree `:import` and `:export` statements.\r\n\r\n```js\r\nimport postcss from 'postcss';\r\nimport { extractICSS } from 'icss-utils'\r\n\r\nconst css = postcss.parse(`\r\n  :import(colors) {\r\n    a: b;\r\n  }\r\n  :export {\r\n    c: d;\r\n  }\r\n`)\r\n\r\nextractICSS(css)\r\n/*\r\n  {\r\n    icssImports: {\r\n      colors: {\r\n        a: 'b'\r\n      }\r\n    },\r\n    icssExports: {\r\n      c: 'd'\r\n    }\r\n  }\r\n*/\r\n```\r\n\r\n## createICSSRules(icssImports, icssExports)\r\n\r\nConverts icss imports and exports definitions to postcss ast\r\n\r\n```js\r\ncreateICSSRules({\r\n  colors: {\r\n    a: 'b'\r\n  }\r\n}, {\r\n  c: 'd'\r\n})\r\n```\r\n\r\n## License\r\n\r\nISC\r\n\r\n---\r\nGlen Maddern and Bogdan Chadkin, 2015.\r\n","repository":{"type":"git","url":"git+https://github.com/css-modules/icss-utils.git"},"bugs":{"url":"https://github.com/css-modules/icss-utils/issues"},"license":"ISC","versions":{"2.0.0":{"name":"icss-utils","version":"2.0.0","description":"ICSS utils for postcss ast","main":"lib/index.js","files":["lib"],"scripts":{"build":"babel --out-dir lib src","test":"jest --coverage","precommit":"lint-staged","prepublish":"yarn run test && yarn run build"},"lint-staged":{"*.js":["prettier --single-quote --no-semi --write","git add"]},"babel":{"presets":[["env",{"targets":{"node":4}}]]},"repository":{"type":"git","url":"git+https://github.com/css-modules/icss-replace-symbols.git"},"keywords":["css","modules","icss","postcss"],"author":{"name":"Glen Maddern"},"license":"ISC","bugs":{"url":"https://github.com/css-modules/icss-replace-symbols/issues"},"homepage":"https://github.com/css-modules/icss-replace-symbols#readme","dependencies":{"postcss":"^6.0.1"},"devDependencies":{"babel-cli":"^6.24.1","babel-jest":"^20.0.3","babel-preset-env":"^1.5.1","husky":"^0.13.3","jest":"^20.0.3","lint-staged":"^3.4.2","prettier":"^1.3.1"},"gitHead":"6e45ef34241a657034c08165f2d8b5fb3954a0d2","_id":"icss-utils@2.0.0","_shasum":"9eb8432af871adc003e4ac7a574d24169398317d","_from":".","_npmVersion":"4.5.0","_nodeVersion":"6.3.1","_npmUser":{"name":"trysound","email":"trysound@yandex.ru"},"dist":{"shasum":"9eb8432af871adc003e4ac7a574d24169398317d","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/icss-utils/-/icss-utils-2.0.0.tgz"},"maintainers":[{"name":"trysound","email":"trysound@yandex.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/icss-utils-2.0.0.tgz_1495648598480_0.550774097442627"},"directories":{}},"2.1.0":{"name":"icss-utils","version":"2.1.0","description":"ICSS utils for postcss ast","main":"lib/index.js","files":["lib"],"scripts":{"build":"babel --out-dir lib src","test":"jest --coverage","precommit":"lint-staged","prepublish":"yarn test && yarn run build"},"lint-staged":{"*.js":["eslint","prettier --write","git add"]},"eslintConfig":{"parserOptions":{"ecmaVersion":6,"sourceType":"module"},"extends":"eslint:recommended"},"babel":{"presets":[["env",{"targets":{"node":4}}]]},"repository":{"type":"git","url":"git+https://github.com/css-modules/icss-utils.git"},"keywords":["css","modules","icss","postcss"],"author":{"name":"Glen Maddern"},"license":"ISC","bugs":{"url":"https://github.com/css-modules/icss-utils/issues"},"homepage":"https://github.com/css-modules/icss-utils#readme","dependencies":{"postcss":"^6.0.1"},"devDependencies":{"babel-cli":"^6.24.1","babel-jest":"^20.0.3","babel-preset-env":"^1.5.1","eslint":"^3.19.0","husky":"^0.13.3","jest":"^20.0.3","lint-staged":"^3.4.2","prettier":"^1.3.1"},"gitHead":"3442cc3ba047d67035ab7129e0da01a6247718f0","_id":"icss-utils@2.1.0","_shasum":"83f0a0ec378bf3246178b6c2ad9136f135b1c962","_from":".","_npmVersion":"4.5.0","_nodeVersion":"6.3.1","_npmUser":{"name":"trysound","email":"trysound@yandex.ru"},"dist":{"shasum":"83f0a0ec378bf3246178b6c2ad9136f135b1c962","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/icss-utils/-/icss-utils-2.1.0.tgz"},"maintainers":[{"name":"geelen","email":"hi@glenmaddern.com"},{"name":"trysound","email":"trysound@yandex.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/icss-utils-2.1.0.tgz_1495828901533_0.18073372449725866"},"directories":{}},"3.0.0":{"name":"icss-utils","version":"3.0.0","description":"ICSS utils for postcss ast","main":"lib/index.js","files":["lib"],"scripts":{"build":"babel --out-dir lib src","test":"jest --coverage","precommit":"lint-staged","prepublish":"yarn test && yarn run build"},"lint-staged":{"*.js":["prettier --write","eslint","git add"]},"eslintConfig":{"parserOptions":{"sourceType":"module"},"env":{"es6":true},"extends":"eslint:recommended"},"babel":{"presets":[["env",{"targets":{"node":4}}]]},"repository":{"type":"git","url":"git+https://github.com/css-modules/icss-utils.git"},"keywords":["css","modules","icss","postcss"],"author":{"name":"Glen Maddern"},"license":"ISC","bugs":{"url":"https://github.com/css-modules/icss-utils/issues"},"homepage":"https://github.com/css-modules/icss-utils#readme","dependencies":{"postcss":"^6.0.2"},"devDependencies":{"babel-cli":"^6.24.1","babel-jest":"^20.0.3","babel-preset-env":"^1.5.2","eslint":"^4.0.0","husky":"^0.13.4","jest":"^20.0.4","lint-staged":"^3.6.1","prettier":"^1.4.4"},"gitHead":"f40da139f86e8514a6a58230437f1da71f5f5084","_id":"icss-utils@3.0.0","_shasum":"6538fc5f3845567477dd7e898a403ea22d6af459","_from":".","_npmVersion":"4.5.0","_nodeVersion":"6.3.1","_npmUser":{"name":"trysound","email":"trysound@yandex.ru"},"dist":{"shasum":"6538fc5f3845567477dd7e898a403ea22d6af459","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/icss-utils/-/icss-utils-3.0.0.tgz"},"maintainers":[{"name":"geelen","email":"hi@glenmaddern.com"},{"name":"trysound","email":"trysound@yandex.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/icss-utils-3.0.0.tgz_1497481139017_0.6673620764631778"},"directories":{}},"3.0.1":{"name":"icss-utils","version":"3.0.1","description":"ICSS utils for postcss ast","main":"lib/index.js","files":["lib"],"scripts":{"build":"babel --out-dir lib src","test":"jest --coverage","precommit":"lint-staged","prepublish":"yarn test && yarn run build"},"lint-staged":{"*.js":["prettier --write","eslint","git add"]},"eslintConfig":{"parserOptions":{"sourceType":"module"},"env":{"es6":true},"extends":"eslint:recommended"},"babel":{"presets":[["env",{"targets":{"node":4}}]]},"repository":{"type":"git","url":"git+https://github.com/css-modules/icss-utils.git"},"keywords":["css","modules","icss","postcss"],"author":{"name":"Glen Maddern"},"license":"ISC","bugs":{"url":"https://github.com/css-modules/icss-utils/issues"},"homepage":"https://github.com/css-modules/icss-utils#readme","dependencies":{"postcss":"^6.0.2"},"devDependencies":{"babel-cli":"^6.24.1","babel-jest":"^20.0.3","babel-preset-env":"^1.5.2","eslint":"^4.0.0","husky":"^0.13.4","jest":"^20.0.4","lint-staged":"^3.6.1","prettier":"^1.4.4"},"gitHead":"911bfc659edc628748f89cf26d6dd377908b0648","_id":"icss-utils@3.0.1","_shasum":"ee70d3ae8cac38c6be5ed91e851b27eed343ad0f","_from":".","_npmVersion":"4.5.0","_nodeVersion":"6.3.1","_npmUser":{"name":"trysound","email":"trysound@yandex.ru"},"dist":{"shasum":"ee70d3ae8cac38c6be5ed91e851b27eed343ad0f","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/icss-utils/-/icss-utils-3.0.1.tgz"},"maintainers":[{"name":"geelen","email":"hi@glenmaddern.com"},{"name":"trysound","email":"trysound@yandex.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/icss-utils-3.0.1.tgz_1497481530059_0.816394830821082"},"directories":{}}},"name":"icss-utils","time":{"modified":"2017-06-14T23:05:31.065Z","created":"2017-05-24T17:56:39.955Z","2.0.0":"2017-05-24T17:56:39.955Z","2.1.0":"2017-05-26T20:01:42.433Z","3.0.0":"2017-06-14T22:58:59.931Z","3.0.1":"2017-06-14T23:05:31.065Z"},"readmeFilename":"README.md","homepage":"https://github.com/css-modules/icss-utils#readme"}