https://github.com/deepraining/vue-lib-starter
一个用于快速创建 Vue 组件库的模板脚手架,使用 Storybook 构建. A boilerplate for creating a Vue library, using Storybook.
https://github.com/deepraining/vue-lib-starter
boilerplate gulp jest lib library starter storybook vue webpack
Last synced: 9 months ago
JSON representation
一个用于快速创建 Vue 组件库的模板脚手架,使用 Storybook 构建. A boilerplate for creating a Vue library, using Storybook.
- Host: GitHub
- URL: https://github.com/deepraining/vue-lib-starter
- Owner: deepraining
- License: mit
- Created: 2019-03-09T04:31:17.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-07-30T02:19:29.000Z (over 6 years ago)
- Last Synced: 2025-03-05T04:29:36.922Z (about 1 year ago)
- Topics: boilerplate, gulp, jest, lib, library, starter, storybook, vue, webpack
- Language: JavaScript
- Homepage:
- Size: 13.7 KB
- Stars: 3
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.en.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# vue-lib-starter
[中文文档](./README.md)
A boilerplate for creating a Vue library, using Storybook.
## Getting started
```
git clone https://github.com/senntyou/vue-lib-starter.git --depth=1
cd vue-lib-starter
npm install # install dependencies
npm run storybook # develop using storybook
npm run build # build distribution files
```
## Features
- [less](http://lesscss.org/), [scss](https://sass-lang.com/) style languages support.
- [Single File Components](https://vuejs.org/v2/guide/single-file-components.html), [jest](https://jestjs.io/en/) test support.
- Using [storybook](https://storybook.js.org/) to develop, preview, deploy static site.
## Project
```
- src
- index.js # js entry file
- styles
- index.{less,scss} # style entry file
- .storybook # for storybook
- stories # for storybook
```
By default, styles use `less` language, if you want to use `scss` language, you should modify `package.json` by:
```
"scripts": {
- "build:styles": "npm run build:less",
+ "build:styles": "npm run build:scss",
}
```
## Notes
- It's recommended to write styles separately with scripts and templates (not in `.vue` files, but in `.{less,scss}` files).