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

lcj-vue-cli

v1.0.2

Published

【1】在github上上传自己封装好的vue基础模版(项目lcj-cli-vue) ### 【2】生成一个项目(lcj-cli)用来存放脚手架工具代码 【3】运行 npm init -y 生成package.json文件 【4】运行 npm i commander download-git-repo 安装我们需要的模块commander,download-git-repo。 //commander: tj大神开发的可以对命令行做解析的库,可以解析我们在命令行输入的如lcj-vue-cli -v或lcj-v

Downloads

5

Readme

【1】在github上上传自己封装好的vue基础模版(项目lcj-cli-vue)

【2】生成一个项目(lcj-cli)用来存放脚手架工具代码 【3】运行 npm init -y 生成package.json文件 【4】运行 npm i commander download-git-repo 安装我们需要的模块commander,download-git-repo。 //commander: tj大神开发的可以对命令行做解析的库,可以解析我们在命令行输入的如lcj-vue-cli -v或lcj-vue-cli init 等命令。 //download-git-repo: 下载git仓库代码的库。 【5】在项目根目录创建index.js文件,写入相应的处理逻辑 #! /usr/bin/env node

const program = require('commander');
const download = require('download-git-repo');
//version 版本号
//name 新项目名称
program.version('1.0.0', '-v, --version')
    .command('init <projectName>')
    .action((projectName) => {
        console.log('clone template ...lcj');
        download('github:Daisylcj/lcj-cli-vue', projectName, function (err) {
            console.log(err ? 'Error' : 'Success')
        })
    });
program.parse(process.argv);
.#! /usr/bin/env node是执行这个文件时使用node方式执行
.program.version是解析别人输入lcj-vue-cli -v时输出的内容: 1.0.0
.command解析输入lcj-vue-cli init vue my-vue-project,init后面两个参数,一个模板名,一个项目名
.action是根据上面的两个参数做相应的逻辑处理,判断模板名,去相应的git仓库下载代码。download的第一个参数下载地址不是填我们git的网址,按照我的格式填就行,第二个参数是生成的项目名,第三个参数是错误的回调执行函数。

【6】在package.json文件中加入,这一步是我们在命令行lcj-vue-cli的时候执行的文件。 "bin": { "jkc-cli": "index.js" },

【7】把脚手架工具上传到npm npm login npm publish !!!每次更新发布记得修改版本号

【8】测试 npm i lcj-vue-cli -g lcj-vue-cli -v lcj-vue-cli init my-vue-project