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

vvan-cli

v1.2.1

Published

front-template cli

Downloads

4

Readme

vvan-cli

A node cli project

Build Setup

# install dependencies
npm install vvan-cli -g

# create a vue project
vvan create vue <projectName>

Command Options

  • -h: help
  • -v: version
  • init: initial vvan.config.js
  • create template [templateName]: create template
  • create electron [projectName]: create an electron project
  • create vue [projectName]: create a vue project

vvan.config.js Options

// 读取项目下的vvan.config.js,没有则使用默认配置,配置中涉及到路径以命令行的工作目录为基准
const defaultConfig = {
  outputPath: "", // 全局模板输出路径
  defaults: ["vue-base-template"], // 可提前配置默认选择模板name,不设置默认选择,则通过问询来选择
  ctx:{ // 模板的上下文,可以在模板中通过"$$变量名"引用变量
    name:'' // 内置变量 $$_name 用户输入的模板名 $$_filename 多模板中的当前文件名
  },
  templateList: [
    // 如果只有一个模板,则默认选择第一个模板,不经过问询
    { // 该模板已内置,仅作为示例,请勿重复使用
      name: "vue-base-template", // 模板名
      description: "生成vue的基础组件",
      path: "", // 可提供文件路径作为模板
      postfix: ".vue", // 自定义生成文件的扩展名
      outputPath:"", // 指定该模板的输出路径,如果指定目录部分不存在将自动创建
      template: [
        "<template>",
        '  <div class="$$_name">\n    template\n  </div>',
        "</template>",
        "",
        "<script>",
        "// import x from ''",
        "export default {",
        "  name: '$$_name',",
        "  components: {",
        "",
        "  },",
        "  data() {",
        "    return {",
        "      data: ''",
        "    }",
        "  },",
        "  computed: {",
        "",
        "  },",
        "  created() {}, // 生命周期 - 组件实例化后",
        "  mounted() {}, // 生命周期 - 挂载之后",
        "  beforeCreate() {}, // 生命周期 - 创建之前",
        "  beforeMount() {}, // 生命周期 - 挂载之前",
        "  beforeUpdate() {}, // 生命周期 - 更新之前",
        "  updated() {}, // 生命周期 - 更新之后",
        "  beforeDestroy() {}, // 生命周期 - 销毁之前",
        "  destroyed() {}, // 生命周期 - 销毁完成",
        "  activated() {}, // 如果页面有keep-alive缓存功能,这个函数会触发",
        "  methods: {",
        "",
        "  }",
        "}",
        "</script>",
        "",
        "<style lang='scss' scoped>",
        ".$$_name{font-size:13px;}",
        ".title{font-size: 14px;font-weight: bold;}",
        "</style>",
        "",
      ],
    },
  ],
};

module.exports = defaultConfig;