npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

vue-spa-template

v2.3.0

Published

一个全功能的vue2全家桶,包括安装、热刷新、js语法检测、单元测试、端对端测试等……

Readme

vue-spa-template

中大型应用,甚至重型应用的首选。一个全功能的vue2全家桶,包括安装、热刷新、js语法检测、单元测试、端对端测试等……

Sauce Labs Test Status (for master branch)

使用

这是一个 SPA ( Single-page application ) 模板项目。用 Vue-cli 来构建。由于是私有项目,所以必须用配置一下 SSH建议使用 npm 3+

$ npm install -g vue-cli
$ vue init iq9891/vue-spa-template my-project --clone
$ cd my-project
$ npm install
$ npm run dev

默认是 8080 端口。如果端口 8080 已在您的计算机上使用,您必须更改端口号( /config/index.js )。否则 npm run dev 会失败。

安装特定版本

Vue-cli 使用该工具 Download-git-repo 下载使用的官方模板。该 Download-git-repo 工具允许您通过在井号( # )之后提供所需的分支名称来指定给定存储库的特定分支。

  1. 私有模板或者线上模板

特定官方模板所需的格式为:

$ vue init '<template-name>#<branch-name>' <project-name>

例:

安装 vue-spa-template 模板的 feature-spa-template 分支:

vue init iq9891/vue-spa-template#feature-spa-template test1 --clone
  1. 本地模板

vui-boilerplate 克隆到本地的 url/path 文件夹下。创建 test1 项目。

vue init url/path/vui-boilerplate test1

npm 淘宝镜像

镜像

目录结构

.
├── docs/                      # 模板项目中的各种说明
│   └── ...
├── template/                  # 模板文件夹
│   └── ...
├── .gitignore                 # git管理控制,文件里面的都不受git控制
├── meta.js                    # vue init 之后的一些问题配置
└── package.json               # 包管理,包括各种依赖,模板生成之后的运行命令……

docs/

这里面关于模板项目的一些说明,包括目录结构,常见问题,线上测试部署。在命令行中运行 npm i -g gitbook ,然后运行 npm run docs ,就可以直接访问 http://localhost:4000 查看文档说明。

template/

这个文件是未来生成出来的模板,里面有很多配置变量。若想fork修改,请参见

本地调试

npm test

  • 自动生成名为 tpltest 的项目
  • 安装需要的依赖 ( npm install )
  • 语法检测 ( npm run lint )
  • 测试,包括端对端测试和单元测试 ( npm test )
  • 进行构建 ( npm run build )