{"_id":"@defite/postcss-prepend-imports","_rev":"1-6639f6be7ce73b9b5b8b5c4d1fb850e9","name":"@defite/postcss-prepend-imports","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.1":{"name":"@defite/postcss-prepend-imports","version":"1.0.1","description":"PostCSS plugin to automatically import global dependencies","keywords":["postcss","css","postcss-plugin","import","variables"],"author":{"name":"@ramonvictor"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/ramonvictor/postcss-prepend-imports.git"},"bugs":{"url":"https://github.com/ramonvictor/postcss-prepend-imports/issues"},"homepage":"https://github.com/ramonvictor/postcss-prepend-imports","dependencies":{"postcss":"^5.0.0"},"devDependencies":{"eslint":"^3.19.0","eslint-config-postcss":"^2.0.2","jest":"^20.0.0","postcss-custom-properties":"^6.1.0","postcss-import":"^10.0.0"},"scripts":{"test":"jest && eslint *.js"},"eslintConfig":{"extends":"eslint-config-postcss/es5","env":{"jest":true}},"main":"index.js","gitHead":"d4c9c184c1c791e4fd1909f514086c03b06f189f","_id":"@defite/postcss-prepend-imports@1.0.1","_nodeVersion":"14.0.0","_npmVersion":"6.14.9","dist":{"integrity":"sha512-5HLvFVZyz14Vre4b/zd1CcYSjxxyIxpVhOUz0e+X7Q80YawUpTxhEbrGpJ/YFpxmig5XxMkIPm0LPRCHXae2Yw==","shasum":"d0606df5539d7659206f6eda232c550895336127","tarball":"https://registry.npmjs.org/@defite/postcss-prepend-imports/-/postcss-prepend-imports-1.0.1.tgz","fileCount":8,"unpackedSize":6684,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfn+vCRA9TVsSAnZWagAA4SgP/Rn6PMn7C9e7D4sWZTxZ\nfFHsSE4eVQCjve6kUtkxvl3DFUvKFBgNLagUVgumUaVInSgB0gj020M+WyDX\n4gY+5Qac5DbR2Ni/cezqA43japunNcP9AglG3Q1ZkDTebz2+NIxQPza1+Aqt\nsorFVsRrx68Rb1gScIvEGLZ8rg1/yFn1EcuvNk3OiBkQp79zsHKcVPHwn7dd\nAGUXIrSspl3TM5wFxPqJONNbx6hvdDfjKR4LO8SLddrVpMZj6WkjRarr1Uij\nI21VCvAUbgki93zAxaB7mn/6caBOh7ubwOi77vMAYLzMNq7oHdPigqZVlD8Y\nVY3s/Rj8nCrrU1Fz4nHbqyj/UdcjRBeTPFJJp93H4eck3Ex1BhmRTDgRHlkL\nI1+YQEXExp1sDrOdwrabNK54K6MGEq6fTD6NAg39Lcf+cjd4iEMB3RhXd8Uu\nMxDzoC0Mf/17PhCDaf+LICWjDeG3yYSlZ4evEAHkLNlgERt8i7S0HewzZv2X\nN9Tb5xCLg0G8JO+VO4T4dysnrFMw7z3nMKDzzbT2d9Rbk9v8tdiwSI6tfBom\nf8TEtqpHZbfSdCWWJctynrKICpAyAXjyS2O0sPUhjx+fOr/SQS8pzdsLjK94\nswny+GJ4mB5Z6CGENh352Xg+EIiCHHdiyk83J9QULVhVsD6jOmhUYXf4wNuf\nkSjg\r\n=i4yB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC2yebKtvpVmRKUkKED5Q5gDNs5yIxl+SOcpJsAppLSwAIgQoHgEtx7chjLQsEAAftqtptFCgJhFqargs8EyszYv4I="}]},"_npmUser":{"name":"defite","email":"me@defite.ru"},"directories":{},"maintainers":[{"name":"defite","email":"me@defite.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postcss-prepend-imports_1.0.1_1618902958375_0.8953466584774115"},"_hasShrinkwrap":false}},"time":{"created":"2021-04-20T07:15:58.335Z","1.0.1":"2021-04-20T07:15:58.841Z","modified":"2022-04-05T03:38:53.889Z"},"maintainers":[{"name":"defite","email":"me@defite.ru"}],"description":"PostCSS plugin to automatically import global dependencies","homepage":"https://github.com/ramonvictor/postcss-prepend-imports","keywords":["postcss","css","postcss-plugin","import","variables"],"repository":{"type":"git","url":"git+https://github.com/ramonvictor/postcss-prepend-imports.git"},"author":{"name":"@ramonvictor"},"bugs":{"url":"https://github.com/ramonvictor/postcss-prepend-imports/issues"},"license":"MIT","readme":"# PostCSS Prepend Imports [![Build Status][ci-img]][ci]\n\n[PostCSS] plugin to automatically import global dependencies.\n\nThat's quite useful when you need to preload variables in all css files.\n\n[PostCSS]: https://github.com/postcss/postcss\n[ci-img]:  https://travis-ci.org/ramonvictor/postcss-prepend-imports.svg\n[ci]:      https://travis-ci.org/ramonvictor/postcss-prepend-imports\n\n**Disclaimer**\n\nIt's advised to use this plugin in combination with both [postcss-import](https://github.com/postcss/postcss-import) and [postcss-custom-properties](https://github.com/postcss/postcss-custom-properties).\n\n**Example using Gulp**\n\n```js\ngulp.task('css', function() {\n    return gulp.src('./src/*.css')\n        .pipe(postcss([\n            require('postcss-prepend-imports')({\n                path: 'shared',\n                files: ['color.css']\n            }),\n            require('postcss-import')(),\n            require('postcss-custom-properties')()\n        ]))\n        .pipe(gulp.dest('./build'));\n});\n\n```\n\n**Variables file example**\n\n```css\n/* ./shared/color.css */\n:root {\n    --background-default: #ccc;\n}\n```\n\n**Input**\n\n```css\n/* ./src/main.css */\n.main {\n    background: var(--background-default);\n}\n```\n\n**Output**\n\n```css\n/* ./build/main.css */\n.main {\n    background: #ccc;\n}\n```\n> Above snippet is the output when we use **postcss-prepend-imports** together with **postcss-import** and **postcss-custom-properties**.\n\n## Installation\n\n```\nnpm install postcss-prepend-imports --save-dev\n```\n\n## Usage\n\n```js\nvar options = {\n    path: '__tests__/fixtures',\n    files: ['colors.css']\n};\n\npostcss([ require('postcss-prepend-imports')(options) ])\n```\n\n## Options\n\n#### path\n\nType: `string` (default: `''`)\n\nSet the root folder where `postcss-prepend-imports` plugin should find files to prepend.\n\n#### files\n\nType: `array` (default: `[]`)\n\nList of file names to prepend in all css files using `@import`.\n\n------------------------------------\nSee [PostCSS] docs for examples for your environment.\n","readmeFilename":"README.md"}