vite-plugin-components
Advanced tools
Comparing version 0.0.0 to 0.1.0
{ | ||
"name": "vite-plugin-components", | ||
"version": "0.0.0", | ||
"main": "index.js", | ||
"license": "MIT" | ||
"version": "0.1.0", | ||
"main": "dist/index.js", | ||
"module": "dist/index.mjs", | ||
"types": "dist/index.d.ts", | ||
"license": "MIT", | ||
"author": "antfu <anthonyfu117@hotmail.com>", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/antfu/vite-plugin-components" | ||
}, | ||
"homepage": "https://github.com/antfu/vite-plugin-components", | ||
"bugs": "https://github.com/antfu/vite-plugin-components/issues", | ||
"files": ["dist"], | ||
"scripts": { | ||
"dev": "npm run build -- --watch", | ||
"build": "tsup src/index.ts --dts --format cjs,esm", | ||
"prepublish": "npm run build" | ||
}, | ||
"devDependencies": { | ||
"@antfu/eslint-config-ts": "^0.3.2", | ||
"@typescript-eslint/eslint-plugin": "^3.9.1", | ||
"eslint": "^7.7.0", | ||
"rollup": "^2.26.4", | ||
"tsup": "^3.6.1", | ||
"typescript": "^3.9.7", | ||
"vite": "^1.0.0-rc.4" | ||
}, | ||
"dependencies": { | ||
"fast-glob": "^3.2.4" | ||
} | ||
} |
@@ -1,1 +0,68 @@ | ||
Placeholder | ||
<h1 align='center'>vite-plugin-components</h1> | ||
<p align='center'>Vite plugin for components auto importing</p> | ||
<br> | ||
## Usage | ||
Install | ||
```bash | ||
npm i vite-plugin-components -D # yarn add vite-plugin-components -D | ||
``` | ||
Add it to `vite.config.js` | ||
```ts | ||
// vite.config.js | ||
import { VitePluginComponents } from 'vite-plugin-components' | ||
export default { | ||
plugins: [ | ||
VitePluginComponents() | ||
] | ||
} | ||
``` | ||
Import and install `vite-plugin-components` in your `main.js` | ||
```ts | ||
import { createApp } from 'vue' | ||
import App from './App.vue' | ||
import components from 'vite-plugin-components' // <-- This | ||
const app = createApp(App) | ||
app.use(components) // <-- and this | ||
app.mount('#app') | ||
``` | ||
## Configuration | ||
The following show the default values of the configuration | ||
```ts | ||
VitePluginComponents({ | ||
// Relative path to the directory to search for components. | ||
dirs: ['src/components'], | ||
// Valid file extensions for components. | ||
extensions: ['vue'], | ||
// Search for subdirectories | ||
deep: true, | ||
}) | ||
``` | ||
## Example | ||
See the [Vitesse](https://github.com/antfu/vitesse) starter template. | ||
## Thanks | ||
Thanks to [@brattonross](https://github.com/brattonross), this project is heavily inspired by [vite-plugin-voie](https://github.com/vamplate/vite-plugin-voie). | ||
## License | ||
MIT License © 2020 [Anthony Fu](https://github.com/antfu) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
9517
6
222
1
1
69
0
1
7
+ Addedfast-glob@^3.2.4
+ Added@nodelib/fs.scandir@2.1.5(transitive)
+ Added@nodelib/fs.stat@2.0.5(transitive)
+ Added@nodelib/fs.walk@1.2.8(transitive)
+ Addedbraces@3.0.3(transitive)
+ Addedfast-glob@3.3.2(transitive)
+ Addedfastq@1.17.1(transitive)
+ Addedfill-range@7.1.1(transitive)
+ Addedglob-parent@5.1.2(transitive)
+ Addedis-extglob@2.1.1(transitive)
+ Addedis-glob@4.0.3(transitive)
+ Addedis-number@7.0.0(transitive)
+ Addedmerge2@1.4.1(transitive)
+ Addedmicromatch@4.0.8(transitive)
+ Addedpicomatch@2.3.1(transitive)
+ Addedqueue-microtask@1.2.3(transitive)
+ Addedreusify@1.0.4(transitive)
+ Addedrun-parallel@1.2.0(transitive)
+ Addedto-regex-range@5.0.1(transitive)