{"_rev":"27-3826b523909e7e4a64873f3af0f1e78d","time":{"created":"2022-09-03T05:43:38.173Z","1.0.0":"2022-08-24T04:16:25.999Z","modified":"2022-09-03T05:43:38.581Z","1.0.1":"2022-08-24T07:49:32.455Z","1.0.2":"2022-08-25T02:56:43.532Z","1.0.3":"2022-08-30T06:41:26.754Z","1.0.4":"2022-09-03T05:30:37.252Z","1.0.5":"2022-09-03T05:43:38.391Z"},"_id":"@yp910108/babel-plugin-component","name":"@yp910108/babel-plugin-component","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.5":{"name":"@yp910108/babel-plugin-component","version":"1.0.5","description":"Modularly import plugin for babel.","author":{"name":"yp910108"},"main":"lib/index.js","scripts":{"test":"rm -rf test/lib && babel --config-file ./test/babel.config.js test/src -d test/lib","lib":"rm -rf lib && babel src -d lib","prepublish":"npm run lib"},"repository":{"type":"git","url":"git+ssh://git@github.com/yp910108/babel-plugin-component.git"},"homepage":"https://github.com/yp910108/babel-plugin-component","keywords":["babel-plugin"],"license":"MIT","dependencies":{"@babel/helper-module-imports":"7.18.6"},"devDependencies":{"@babel/cli":"7.18.10","@babel/core":"7.18.10","@babel/preset-env":"7.18.10","prettier":"2.6.2"},"gitHead":"5001a34d76816474b0d9c3c822e28d5ef421d439","bugs":{"url":"https://github.com/yp910108/babel-plugin-component/issues"},"_id":"@yp910108/babel-plugin-component@1.0.5","_nodeVersion":"12.18.4","_npmVersion":"6.14.6","dist":{"integrity":"sha512-aS784vFYG2tH+XpSF/DrQAuN1t7XpqHRadHkKz0KYeX/tg2U4X6SnFWwuTF9eFWFGh2NQtuGJqDjoGJlXmaKCw==","shasum":"a2d6a798d5e22533c4d45029adf9edbb5ad08185","tarball":"https://registry.npmjs.org/@yp910108/babel-plugin-component/-/babel-plugin-component-1.0.5.tgz","fileCount":5,"unpackedSize":17673,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFG9K5B1WpdjJt30fsgmdf6KBkY77OaBe1v6tCzGPDD1AiBVGE9UBFS4HnYsl5V+VL/6uK/cF6ZRkuOf1NIfBG92CQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjEumKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqixA/9HUqHXv6+1xTQXNo0JIoZ24aEUy/brQAT+vG2RSvN+3cdk6O7\r\nRN+n33+gcXcYPGmCQxSrgtEXJMU2yP3W5vOWfVepb75ouAbYLauHZaYI8W0c\r\nY365jksdZcvfXNxzFoksQBYGSzGP5FW/qI6GjfLmQjM22+KTiTdgKgAQK/ln\r\nPZeifwAi7aAUNw6kcxzTRWjMRvjuwXrksE6sDli+peXYuLYQsQDVohImW66R\r\nPbzozUEHUI57mFy3nLpyp5kTqG9wnBuvE+6bq13fCB83c01gqqHKff9usxlV\r\nuF2dVY/pQgmSfewZ3frz6hsZwS4JRwrl8iTznqCu7ETUwC2Ghtcb0BxM1zvT\r\nEukRFD/52D2fN//szGtackkQtZVtScmgCQwwwPA4TYmxfuj9l+Jk96TICt+d\r\nXfnqlvUNtvRAV1HZ6hqcnKqwyN67noqcqwTweOL9KFB9VICBhQ1BmenEBzg7\r\nH6Fs9H7bG7iAFka+ca84yu9XKnv3HIelgoUJXCdCK1B9sT463H9m6WkRWVHy\r\nweVLIb/xnz1VHr0MNW5kJMSgsvkBcExXfYMh6vwWMPeeh0ej17LyktWwOrj1\r\nU66m+Iw6InKdXfFVVOyfUKRikBEBqmSIkTll8OuDGtlmEakZZ8tRAvjrmkld\r\nvS+S/t+/sRStqyK1EJcdfOQaMh4xnUyMDqg=\r\n=fGps\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"yp910108","email":"1548018679@qq.com"},"directories":{},"maintainers":[{"name":"yp910108","email":"1548018679@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-plugin-component_1.0.5_1662183818239_0.8097448453224272"},"_hasShrinkwrap":false}},"maintainers":[{"name":"yp910108","email":"1548018679@qq.com"}],"description":"Modularly import plugin for babel.","homepage":"https://github.com/yp910108/babel-plugin-component","keywords":["babel-plugin"],"repository":{"type":"git","url":"git+ssh://git@github.com/yp910108/babel-plugin-component.git"},"author":{"name":"yp910108"},"bugs":{"url":"https://github.com/yp910108/babel-plugin-component/issues"},"license":"MIT","readme":"# babel-plugin-component\n\n## Install\n\n```shell\nnpm i @yp910108/babel-plugin-component -D\n```\n\n## Usage\n\nVia `.babelrc` or `babel.config.js`.\n\n```javascript\nmodule.exports = {\n  plugins: [\n    [\n      '../src',\n      {\n        libraryName: 'components',\n        style: true, // default is true\n        stylePathElement: function (componentName) {\n          return `@/styles/element/${componentName}.css`\n        },\n        stylePath: function (componentName) {\n          return `@/styles/components/${componentName}.css`\n        }\n      }\n    ]\n  ]\n}\n```\n\n## Example\n\n```javascript\nimport { Button, Select } from 'components'\n\nVue.use(Button)\nVue.use(Select)\n\n      ↓ ↓ ↓ ↓ ↓ ↓\n\nimport '@/styles/element/base.css'\n\nimport '@/styles/element/select.css'\nimport ElSelect from 'element-ui/lib/select.js'\nimport '@/styles/components/select.css'\nimport Select from 'components/lib/select.js'\n\nimport '@/styles/element/button.css'\nimport ElButton from 'element-ui/lib/button.js'\nimport '@/styles/components/button.css'\nimport Button from 'components/lib/button.js'\n\nVue.use(ElSelect)\nVue.use(Select)\n\nVue.use(ElButton)\nVue.use(Button)\n```\n","readmeFilename":"README.md"}