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 🙏

© 2024 – Pkg Stats / Ryan Hefner

yz-cli

v0.6.11

Published

yazuo web project scaffold

Downloads

15

Readme

ya-cli

Simple CLI for scaffolding Ya projects

安装

环境 : Node.js , npm 3.0+、 Git.

npm install -g yz-cli

创建项目

在要创建项目的路径执行 ‘ya init’。

$ ya

  Usage: ya <command> [options]

  Options:

    -V, --version  output the version number
    -h, --help     output usage information

$ ya init

  Usage: ya-init [project-name]


  Options:

    -o, --offline  使用已经下载的本地模板
    --template [value] 选择使用的模板
    -i, --install  下载模板后自动安装依赖
    -h, --help     output usage information

$ ya update
  Usage: ya-update [project-name]

  Options:

    -h, --help          output usage information
    -o, --offline       使用本地模板
    --template [value]  选择使用的模板
    -i, --install       下载模板后自动安装依赖

Examples:

创建 / 更新项目

$ ya init project1

在当前目录创建 / 更新项目

$ ya init

更新当前项目

$ ya update project1

在当前目录更新项目

$ ya update

使用本地模板 & 自动安装依赖

$ ya init project1 -i -o

默认模板进行开发

默认模板 使用如下

开发环境

开启本地服务器开发并热替换。默认开启 eslint(standard)、flow。

$ cd [project]
$ npm run dev

生产

$ npm run build

mock

使用mockjs规则生成 mock 数据。

$ npm run mock

开启 mock 服务后即可本地 mock 请求。配置规则参考 tools/config dev.proxyTable。可于/src/mock 文件夹按请求地址创建 js/json 文件并填写符合 mockjs 规则或普通数据。如:

c2s('/ya/modules/test')

对应
  \ya
  -- \modules
  ---- \test.json

flow

默认集成在eslint中。
也可以关闭自行使用 $ npm run flow 检测,或 $ npm run flowserver 实时监听。
使用eslint时,如遇到提示模块未发现。可手动执行stopflow关闭flow服务后重新
$ npm run dev

自定义模板

自定义模板无需发布到 npm,只需上传到 github 并通过 template 参数使用即可

$ ya init project1 --template q13/vue-spa-template