{"_id":"@c0nst4ntin/vue-component-importer","_rev":"7-c3b2b0c6290916395528793e19fe5b57","time":{"0.0.1":"2019-10-25T19:20:27.380Z","created":"2019-10-26T09:08:53.561Z","1.0.0":"2019-10-26T09:08:53.903Z","modified":"2022-04-04T21:24:01.205Z"},"name":"@c0nst4ntin/vue-component-importer","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"private":false,"name":"@c0nst4ntin/vue-component-importer","version":"1.0.0","description":"A Vue.js plugin to globally import all vue components","author":{"name":"Constantin Ross"},"license":"MIT","main":"./lib/index.js","scripts":{"clean":"rimraf lib","lint":"eslint src","build":"cross-env BABEL_ENV=production babel src --out-dir lib","prepublish":"npm run clean && npm run lint && npm run build"},"devDependencies":{"babel-cli":"^6.26.0","babel-eslint":"^10.0.1","babel-plugin-add-module-exports":"^1.0.0","babel-polyfill":"^6.26.0","babel-preset-env":"^1.6.1","babel-preset-minify":"^0.5.0","cross-env":"^5.1.3","eslint":"^5.16.0","eslint-config-airbnb":"^17.1.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.4.0","rimraf":"^2.6.2"},"gitHead":"605bcd3f83109badaa27657965fc55072aa6d1bd","_id":"@c0nst4ntin/vue-component-importer@1.0.0","_nodeVersion":"11.11.0","_npmVersion":"6.12.0","dist":{"integrity":"sha512-0PDbxoX4QxF09dor1lcoyky8zQkGLjpPNLmaxuBRJD62iwbk2g5PBE6Kw/0nLfhFJZhFejZa8oYqJhZbUoOHbw==","shasum":"25071fdcf0ac24cd10ea95fd53889b17f6ca719b","tarball":"https://registry.npmjs.org/@c0nst4ntin/vue-component-importer/-/vue-component-importer-1.0.0.tgz","fileCount":5,"unpackedSize":5262,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdtA0mCRA9TVsSAnZWagAA/AcP/iVGTwrZem9bxi6EgRG1\nR/52Ov9n9NSRV/QRCgNXzijmn96GL/TIDIftT3EQzsR4mVw+qFOOP4ynVt2v\nogqEKtFCL5S3RiwpRcL5MOSH9VCww12KS5NvF19Ti518/G8hNsx9iIPpT260\nvlVfi/rRsmnXDNIcODuMwQcaaQcWi4j0z3e81vhp7S1vf+5mEQPPkY2/pUKk\n14KF8cPzAjWNbrW5DaC30NXKjjH5wJOQLTL6cN6UHw2nYLtgOxy2ENu8rbDU\nJuB4B9Y1cwXmannFcNtMOzusXPEHH5lMuO0qldg5onMgP5jsX6WyBLDMU5S2\ntxIyWZSAXqWEmWm1i0W1XQSeWV2q+RWLi6dbSAxnh9K6qYmfsGkjIyy+SCQm\nYSTg1KxEa6J2rtjn9BbpcS99O5bHlO++cqNkEPC65tleVEw9e7LrT++sJt73\nNLCfbZ5AVEqfIlh2680Y6SB/A2G0aSSUQbVrs2CAAh/tNzhiOQSPOYco21wW\npZ9WwU04jpPcwdGc7LxLPwJmsPYi23hpjC8lvuUDJz34lnQN2KT0ggPi9prL\nru3JUsL88+diX1cnvmM9EGZPWEec3Rku3p/yXjWa5f17oUFs0ZdHEI4Y2D6J\naZwsacMAKMn10V/MjUEKwaOKFujHmkzJsNs93IdxtRJsLOPORvteVeJho0Tq\noKd4\r\n=d0qF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDMHRTVjYN7cgn6zdiStFEH25zt+vBfFrTZfhG1cFwXFwIgU1EbwYlBe2mGQxfU7eE64lXKuurCrLvVdrESW/lLw9o="}]},"maintainers":[{"name":"c0nst4ntin","email":"contact@constantinross.com"}],"_npmUser":{"name":"c0nst4ntin","email":"contact@constantinross.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-component-importer_1.0.0_1572080933790_0.39203521538605046"},"_hasShrinkwrap":false}},"maintainers":[{"name":"c0nst4ntin","email":"contact@constantinross.com"}],"description":"A Vue.js plugin to globally import all vue components","author":{"name":"Constantin Ross"},"license":"MIT","readme":"<h2 align=\"center\">vue-component-importer</h2>\n\n<p align=\"center\">\n  <a href=\"https://github.com/c0nst4ntin/vue-component-importer/blob/master/LICENSE.md\">\n    <img alt=\"License\" src=\"https://img.shields.io/github/license/c0nst4ntin/vue-component-importer.svg\">\n  </a>\n  <a href=\"https://img.shields.io/github/package-json/v/c0nst4ntin/vue-component-importer\">\n    <img src=\"https://img.shields.io/github/package-json/v/c0nst4ntin/vue-component-importer\">\n  </a>\n  <a href=\"https://img.shields.io/npm/dm/vue-component-importer.svg\">\n    <img src=\"https://img.shields.io/npm/dm/vue-component-importer.svg\">\n</a>\n</p>\n\n<p align=\"center\">\n  <em>\n  Globally import all Vue Components\n  </em>\n</p>\n\nThis Vue.js Plugin will import all your Vue.js Components from a certain directory, enabling you to build a fully modular frontend for your headless CMS.\n\n## Getting Started\n\n### Requirements\n* Please make sure you have working Vue or Nuxt installation running.\n\n### Installation\n\n#### 1) Install the package using Node\n\n```shell\n$ npm i --save vue-component-importer\n```\n\n#### 2a) With Vue\nIn your `src/main.js` file also import the vue-component-importer\n```js\nimport importComponents from 'vue-component-importer'\n```\n\nBefore the creation of your Vue instance add the following code:\n```js\nlet components = require.context('@/components', true, /[a-zA-Z]\\w+\\.(vue)$/)\nimportComponents(Vue, components)\n\n```\nThe first parameter is the folder you want to import your components from. If you just want to include some components you can change the path to just use a subdirectory of components like `@/components/slices`\n\n#### 2b) With Nuxt\nCreate a `plugins/componentimporter.js` file and add the following code:\n```js\nimport Vue from 'vue'\nimport importComponents from 'vue-component-importer'\n\nlet components = require.context('@/components', true, /[a-zA-Z]\\w+\\.(vue)$/)\nimportComponents(Vue, components)\n\n```\nThe first parameter is the folder you want to import your components from. If you just want to include some components you can change the path to just use a subdirectory of components like `@/components/slices`\n\nThen in your `nuxt.config.js` add:\n```js\nplugins: [\n    '~/plugins/componentimporter.js',\n],\n```\n\n### How To Use\nThe first parameter is the folder you want to import your components from. If you just want to include some components you can change the path to just use a subdirectory of components like `@/components/slices`\n\nAs all components in the given directory are imported globally you must not list the components imported by the plugin in the `components: {} `field. The HTML tag is the same as the `name:` property of the component.\n","readmeFilename":"README.md"}