{"name":"jss-expand","description":"JSS plugin that gives you a better syntax than CSS.","version":"2.0.2","author":{"name":"Pavel Davydov","email":"typical000@gmail.com"},"repository":{"type":"git","url":"git+ssh://git@github.com/cssinjs/jss-expand.git"},"keywords":["cssinjs","css-in-js","css in js","jss","plugin","expand"],"scripts":{"all":"npm run lint && npm run test && npm run build","build":"npm run clean && npm run build:lib && npm run build:tests && npm run build:dist","build:lib":"babel src --out-dir lib","build:tests":"npm run build:tests:lib && npm run build:tests:local","build:tests:lib":"cross-env NODE_ENV=test babel src --out-dir tests","build:tests:local":"cross-env NODE_ENV=test webpack src/index.test.js tmp/tests.js","build:dist":"npm run build:dist:max && npm run build:dist:min","build:dist:max":"cross-env NODE_ENV=development webpack src/index.js dist/jss-expand.js","build:dist:min":"cross-env NODE_ENV=production webpack src/index.js dist/jss-expand.min.js","clean":"rimraf '{lib,dist,tests,tmp}/*'","lint":"eslint ./src","lint:staged":"lint-staged","bench":"cross-env NODE_ENV=test BENCHMARK=true karma start --single-run ","test":"cross-env NODE_ENV=test karma start --single-run ","test:watch":"cross-env NODE_ENV=test karma start","prepublish":"npm run all"},"license":"MIT","main":"./lib/index.js","devDependencies":{"babel-cli":"^6.14.0","babel-core":"^6.14.0","babel-eslint":"^6.1.2","babel-loader":"^6.2.5","babel-preset-es2015":"^6.14.0","babel-preset-stage-0":"^6.5.0","cross-env":"^2.0.1","eslint":"^2.13.1","eslint-config-airbnb":"^8.0.0","eslint-config-jss":"^1.1.0","eslint-plugin-import":"^1.14.0","eslint-plugin-jsx-a11y":"^1.5.5","eslint-plugin-react":"^5.2.2","expect.js":"^0.3.1","json-loader":"^0.5.4","jss":"^6.0.0","karma":"^1.2.0","karma-benchmark":"^0.6.0","karma-benchmark-reporter":"^0.1.1","karma-browserstack-launcher":"^1.1.1","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.1.1","karma-firefox-launcher":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.1.0","karma-safari-launcher":"^1.0.0","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^1.8.0","lint-staged":"^3.0.1","mocha":"^3.0.2","pre-commit":"^1.1.3","rimraf":"^2.5.4"},"peerDependencies":{"jss":"^6.0.0"},"lint-staged":{"./src/*.js":["eslint","git add"]},"pre-commit":"lint:staged","gitHead":"fd7bba877f02d487a65aa327a552166b2e23b521","bugs":{"url":"https://github.com/cssinjs/jss-expand/issues"},"homepage":"https://github.com/cssinjs/jss-expand#readme","_id":"jss-expand@2.0.2","_shasum":"ed49cb7ba8de6cb24c36c051ad9d153d8ace2d34","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.7.1","_npmUser":{"name":"kof","email":"oleg008@gmail.com"},"dist":{"shasum":"ed49cb7ba8de6cb24c36c051ad9d153d8ace2d34","tarball":"http://registry-npm.ywwl.com/jss-expand/download/jss-expand-2.0.2.tgz","integrity":"sha512-V5o6Vh2Z9hHrAgNN66tifpOhtQxF/DRJIoqcffh+GBYkXNWwg/V0gIGF0M7F8zf6NguVn5tzpIUMCCJ2p+Aa7A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE66bP2uv182v9lPf2L7d1U5GQpDslYUVZ2UU6sftJ1/AiEA6leC1+swYnmY3fC3ntCKbis4f0DQnJY/KWaSw/N5R3U="}],"size":41380,"noattachment":false,"key":"/jss-expand/-/jss-expand-2.0.2.tgz"},"maintainers":[{"name":"kof","email":"oleg008@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/jss-expand-2.0.2.tgz_1482411799429_0.4172974538523704"},"directories":{},"readme":"# JSS plugin that gives you a better syntax than CSS\n\nCan you remember what each of those values mean `box-shadow: 2px 2px 2px 1px gold;` and in which order they have to be used? Me neither. CSS values are sometimes cryptic. This plugin makes them easy to read and to remember.\n\nMake sure you read [how to use\nplugins](https://github.com/cssinjs/jss/blob/master/docs/setup.md#setup-with-plugins)\nin general and [read full documentation](https://github.com/cssinjs/jss-expand/blob/master/docs/index.md).\n\n[![Gitter](https://badges.gitter.im/JoinChat.svg)](https://gitter.im/cssinjs/lobby)\n\n## Example\n\n```javascript\nconst styles = {\n  container: {\n    padding: [20, 10],\n    background: {\n      color: 'green',\n      image: 'url(image.jpg)',\n      position: [0, 0],\n      repeat: 'no-repeat'\n    },\n    boxShadow: {x: 10, y: 10, blur: 5, spread: 5, color: 'black'},\n    transition: [\n      {\n        property: 'opacity',\n        duration: '200ms'\n      },\n      {\n        property: 'width',\n        duration: '300ms'\n      }\n    ]\n  }\n}\n```\nCompiles to:\n\n```css\n.container-3kjh2 {\n  padding: 20px 10px;\n  background: green url(image.jpg) 0 0 no-repeat;\n  box-shadow: 10px 10px 5px 5px black;\n  transition: opacity 200ms, width 300ms;\n}\n```\n\n## Features\n\n1. Expanded object notation for all properties.\n\n  ```javascript\n  border: {\n    width: '1px',\n    style: 'solid',\n    color: 'red'\n  }\n  ```\n\n  will be converted to\n\n  ```css\n  border: 1px solid red;\n  ```\n\n1. Array notation for properties like `margin`, `padding` and others.\n\n  ```javascript\n  padding: [20, 10],\n  borderRadius: ['50%', '10%']\n  ```\n\n1. Expanded arrays for multi value properties.\n\n  ```javascript\n  transition: [{\n    property: 'opacity',\n    duration: '200ms'\n  }, {\n    property: 'width',\n    duration: '300ms'\n  }]\n  ```\n  will be converted to\n\n  ```css\n  transition: opacity 200ms, width 300ms;\n  ```\n\n1. Default unit support.\n\n  Now, using expanded arrays and objects syntax, you don't need to use quotes for the most numeric values! This is achieved in combination with [jss-default-unit](https://github.com/cssinjs/jss-default-unit) plugin.\n\n## Issues\n\nFile a bug against [cssinjs/jss prefixed with \\[jss-expand\\]](https://github.com/cssinjs/jss/issues/new?title=[jss-expand]%20).\n\n## Run tests\n\n```bash\nnpm i\nnpm run test\n```\n\n## Run benchmark tests\n\n```bash\nnpm i\nnpm run bench\n```\n\n## Licence\n\nMIT\n","publish_time":1482411801510,"_cnpm_publish_time":1482411801510,"dist-tags":{"latest":"5.3.0"}}