{"_id":"saladcss-partial-import","_rev":"322173","name":"saladcss-partial-import","description":"PostCSS plugin that imports like Sass","dist-tags":{"latest":"1.0.1"},"maintainers":[{"name":"baiyaaaaa","email":"286030975@qq.com"}],"time":{"modified":"2021-06-04T01:28:08.000Z","created":"2016-05-17T10:41:48.440Z","1.0.1":"2016-06-07T09:29:10.299Z","1.0.0":"2016-05-17T10:41:48.440Z"},"users":{},"author":{"name":"Haiping Zeng","email":"haiping.zeng@eleme.com"},"repository":{"type":"git","url":"git+https://github.com/saladcss/saladcss-partial-import.git"},"versions":{"1.0.1":{"name":"saladcss-partial-import","version":"1.0.1","description":"PostCSS plugin that imports like Sass","keywords":["postcss","css","postcss-plugins","sass","scss","imports","files"],"author":{"name":"Haiping Zeng","email":"haiping.zeng@eleme.com"},"license":"CC0-1.0","repository":{"type":"git","url":"git+https://github.com/saladcss/saladcss-partial-import.git"},"bugs":{"url":"https://github.com/saladcss/saladcss-partial-import/issues"},"homepage":"https://github.com/saladcss/saladcss-partial-import","dependencies":{"fs-extra":"^0.24.0","fs-promise":"^0.3.1","object-assign":"^4.0.1","postcss":"^5.0.5","resolve":"^1.1.7","string-hash":"^1.1.0"},"devDependencies":{"chai":"^3.2.0","eslint":"^2.3.0","eslint-config-postcss":"^2.0.1","mocha":"^2.4.5"},"files":["index.js"],"scripts":{"test":"mocha","posttest":"eslint ."},"engines":{"iojs":">=2.0.0","node":">=0.12.0"},"gitHead":"ee611fed93fe57b4120c1de68e35e821805393aa","_id":"saladcss-partial-import@1.0.1","_shasum":"3c2359ff7d7b2b7169f4f2b415360da01e3031a3","_from":".","_npmVersion":"3.7.3","_nodeVersion":"5.9.1","_npmUser":{"name":"baiyaaaaa","email":"286030975@qq.com"},"dist":{"shasum":"3c2359ff7d7b2b7169f4f2b415360da01e3031a3","size":4152,"noattachment":false,"key":"/saladcss-partial-import/-/saladcss-partial-import-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/saladcss-partial-import/download/saladcss-partial-import-1.0.1.tgz"},"maintainers":[{"name":"baiyaaaaa","email":"286030975@qq.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/saladcss-partial-import-1.0.1.tgz_1465291747472_0.5645389640703797"},"directories":{},"publish_time":1465291750299,"_cnpm_publish_time":1465291750299,"_hasShrinkwrap":false},"1.0.0":{"name":"saladcss-partial-import","version":"1.0.0","description":"PostCSS plugin that imports like Sass","keywords":["postcss","css","postcss-plugins","sass","scss","imports","files"],"author":{"name":"Haiping Zeng","email":"haiping.zeng@eleme.com"},"license":"CC0-1.0","repository":{"type":"git","url":"git+https://github.com/saladcss/saladcss-partial-import.git"},"bugs":{"url":"https://github.com/saladcss/saladcss-partial-import/issues"},"homepage":"https://github.com/saladcss/saladcss-partial-import","dependencies":{"fs-extra":"^0.24.0","fs-promise":"^0.3.1","object-assign":"^4.0.1","postcss":"^5.0.5","string-hash":"^1.1.0"},"devDependencies":{"chai":"^3.2.0","eslint":"^2.3.0","eslint-config-postcss":"^2.0.1","mocha":"^2.4.5"},"files":["index.js"],"scripts":{"test":"mocha","posttest":"eslint ."},"engines":{"iojs":">=2.0.0","node":">=0.12.0"},"gitHead":"6230257f5059341ef6cabc47e2465aa947aedfac","_id":"saladcss-partial-import@1.0.0","_shasum":"8c228d326f7f9a211caad8bb9c5b8f484926f1c1","_from":".","_npmVersion":"3.7.3","_nodeVersion":"5.9.1","_npmUser":{"name":"baiyaaaaa","email":"286030975@qq.com"},"dist":{"shasum":"8c228d326f7f9a211caad8bb9c5b8f484926f1c1","size":4020,"noattachment":false,"key":"/saladcss-partial-import/-/saladcss-partial-import-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/saladcss-partial-import/download/saladcss-partial-import-1.0.0.tgz"},"maintainers":[{"name":"baiyaaaaa","email":"286030975@qq.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/saladcss-partial-import-1.0.0.tgz_1463481704727_0.5563770919106901"},"directories":{},"publish_time":1463481708440,"_cnpm_publish_time":1463481708440,"_hasShrinkwrap":false}},"readme":"# Partial Import [![Build Status][ci-img]][ci]\n\n<img align=\"right\" width=\"135\" height=\"95\" src=\"http://postcss.github.io/postcss/logo-leftp.png\" title=\"Philosopher’s stone, logo of PostCSS\">\n\n[Partial Import] is a [PostCSS] plugin that inlines standard and Sass-like `@import` statements.\n\n```css\n/* before file.css */\n\n@import \"foo/bar\";\n\n/* before foo/_bar.css */\n\nhtml {\n    background-color: #fafafa;\n}\n\n/* after */\n\nhtml {\n    background-color: #fafafa;\n}\n\n```\n\n## Usage\n\nFollow these steps to use [Partial Import].\n\nAdd [Partial Import] to your build tool:\n\n```bash\nnpm install postcss-partial-import --save-dev\n```\n\n#### Node\n\n```js\nrequire('postcss-partial-import')({ /* options */ }).process(YOUR_CSS);\n```\n\n#### PostCSS\n\nAdd [PostCSS] to your build tool:\n\n```bash\nnpm install postcss --save-dev\n```\n\nLoad [Partial Import] as a PostCSS plugin:\n\n```js\npostcss([\n    require('postcss-partial-import')({ /* options */ })\n]);\n```\n\n#### Gulp\n\nAdd [Gulp PostCSS] to your build tool:\n\n```bash\nnpm install gulp-postcss --save-dev\n```\n\nEnable [Partial Import] within your Gulpfile:\n\n```js\nvar postcss = require('gulp-postcss');\n\ngulp.task('css', function () {\n    return gulp.src('./css/src/*.css').pipe(\n        postcss([\n            require('postcss-partial-import')({ /* options */ })\n        ])\n    ).pipe(\n        gulp.dest('./css')\n    );\n});\n```\n\n#### Grunt\n\nAdd [Grunt PostCSS] to your build tool:\n\n```bash\nnpm install grunt-postcss --save-dev\n```\n\nEnable [Partial Import] within your Gruntfile:\n\n```js\ngrunt.loadNpmTasks('grunt-postcss');\n\ngrunt.initConfig({\n    postcss: {\n        options: {\n            processors: [\n                require('postcss-partial-import')({ /* options */ })\n            ]\n        },\n        dist: {\n            src: 'css/*.css'\n        }\n    }\n});\n```\n\n## Options\n\n#### `encoding`\n\nType: `String`  \nDefault: `utf8`\n\nThe character encoding of files being imported.\n\n#### `extension`\n\nType: `String`  \nDefault: `css`\n\nThe file extension appended to partials being imported.\n\n#### `prefix`\n\nType: `String`  \nDefault: `_`\n\nThe file extension sometimes prepended to partials being imported.\n\n#### `generate`\n\nType: `Boolean`  \nDefault: `false`\n\nThe option if partials should be generated if they do not already exist.\n\n#### `cachedir`\n\nType: `String`  \nDefault: `null`\n\nThe directory to store cached includes in. Can reduce compilation time when there are a lot of `@include`s. Setting this property enables the cache.\n\n#### `addDependencyTo`\n\nType: `function`  \nDefault: `null`\n\nTo pass CSS @import files to a compiler (such as webpack), which would otherwise not know which CSS files to watch for browser reloading.\n\n*Example*\n\n```javascript\n// webpack.config.js\npostcss: function(webpack) {\n    return [\n        precss({ addDependencyTo: webpack })\n    ];\n},\n```\n\n[ci]: https://travis-ci.org/jonathantneal/postcss-partial-import\n[ci-img]: https://travis-ci.org/jonathantneal/postcss-partial-import.svg\n[Gulp PostCSS]: https://github.com/postcss/gulp-postcss\n[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss\n[PostCSS]: https://github.com/postcss/postcss\n[Partial Import]: https://github.com/saladcss/saladcss-partial-import\n","_attachments":{},"homepage":"https://github.com/saladcss/saladcss-partial-import","bugs":{"url":"https://github.com/saladcss/saladcss-partial-import/issues"},"license":"CC0-1.0"}