Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
使用vue-cli3.0的脚手架搭建的项目
使用vue2.0
文档编辑使用 vuepress
index.ts
。::: warning Note
.
├── Button (实例展示)
│ ├── button.vue/index.vue
(vue组件)
│ └── index.ts
(输出,命名请采用index.ts)
:::
在 .vuepress/config.js 里面配置路由
在 .vuepress/enhanceApp.js 里面引入组件
详情参考已有的例子,例如docs/components/button.md
, 或者访问vuepress官网获取更多内容。
由于项目内的文件名单数、复数等都不太统一,所以专门来定一下规则,让代码结构更加美观一些。
-
中划线隔开;待调整:
::: warning Note
.
├── config (配置文件)
├── docs (文档编写)
│ ├── .vuepress (存放vurpress全局的配置、组件、静态资源等)
│ │ ├── config.js
(配置文件的入口文件)
│ │
│ └── README.md (文档首页)
│
├── example (实例展示)
│ ├── assets (静态资源)
│ ├── router (路由配置)
│ ├── views (存放页面)
│ ├── app.vue
(layout页面)
│ └── main.ts
(入口文件)
├── packages (存放组件)
│ └── _helper
(存放组件相关的帮助方法、公共组件、数据等)
│ └── _style
(存放组件相关的公共样式内容)
│ └── index.ts
(所有组件的入口文件)
├── script(相关指令文件)_
└── package.json
:::
运行 npm run serve 以开发模式跑 example 目录
运行 npm run docs:dev 以开发模式跑 文档
运行 npm run build 打包packages目录,生成组件库,组件库生成在lib目录下
(单元测试工具调整,此处内容待更新)
为了让组件提供的功能更加具有可信度,我们增加了单元测试的内容,推荐的文件命名为 FileName.spec.ts
,以下命令可以帮助你很快创建一个单元测试文件,并且跑起来。
(测试覆盖率后期会补充)
采用的技术:karma, mocha, chai, sinion, typescript 相关配置:karma.config.js
tests
目录下创建 Button.spec.ts
文件。yarn test:create button
// or
npm run test:create button
yarn test
// or
npm run test
yarn test --file=Button
// or
npm run test --file=Button
yarn test --single-run=true
// or
npm run test --single-run=true
FAQs
使用vue-cli3.0的脚手架搭建的项目 使用vue2.0 文档编辑使用 vuepress
The npm package holo-ui receives a total of 2 weekly downloads. As such, holo-ui popularity was classified as not popular.
We found that holo-ui demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.