Skip to content

Commit

Permalink
docs: up doc
Browse files Browse the repository at this point in the history
  • Loading branch information
pakholeung37 committed Mar 1, 2021
1 parent 19a552e commit 382e5fb
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
lib
*.log
37 changes: 25 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,34 @@
# rollup-starter-ts
# vite-plugin-vue2-svg

To fast start a typescript library.
load SVG files as Vue components, for Vue2.x only.

## Getting started

Clone this repository and install its dependencies:
## Install

```bash
git clone https://github.com/zenoslin/rollup-starter-ts.git
cd rollup-starter-ts
npm install
yarn install vite-plugin-vue2-svg
```

## Usage

```js
// vite.config.ts
import { defineConfig } from "vite";
import { createVuePlugin } from "vite-plugin-vue2"; // vue2 plugin
import { createSvgPlugin } from "vite-plugin-vue2-svg";

export default defineConfig({
plugins: [createVuePlugin(), createSvgPlugin()],
});
```

## scripts
- `npm run build` builds the library to `lib`.
- `npm run build:type` builds `.d.ts` file for the library.
- `npm run test` use `jest` to test the source files.
## Options

```js
createSvgPlugin({
svgoConfig: SVGO.Options, // check https://github.com/svg/svgo
});
```

## License

[MIT](LICENSE)
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vite-plugin-vue2-svg",
"version": "0.1.0",
"version": "0.1.1",
"description": "To fast start a typescript library.",
"main": "lib/index.js",
"scripts": {
Expand Down

0 comments on commit 382e5fb

Please sign in to comment.