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

@vf.js/cli

v1.1.11

Published

VF-CLI 能帮你快速开发并自动产出 VF Engine 所需要的 JSON 数据

Downloads

1

Readme

概览

VF-CLI 能帮你快速开发并自动产出 VF Engine 所需要的 JSON 数据

安装

npm install -g @vf.js/cli

使用

创建一个 VF 项目:

vf init hello-world

最终结果如图:

初始化:

  1. Project Name: 项目的名称
  2. Project description(可选): 项目描述
  3. Install Vue template test: 是否安装前端 Vue 模版项目,是否安装会产出不同的项目路径结构

不安装 Vue template 的结构为:

   hello-world
   |---build
   |---src
   |---types
   |---t2j.config.json

安装 Vue template 后的结构为:

hello-world
|----web
     |---build
     |---static
     |---vf-json
     |---index.html
     |---index.js
     |---...
|----ts2json
     |---build
     |---src
     |---types
     |---t2j.config.json
     |---...
       

其中安装后的结构,ts2json/ 文件夹里负责编写 Typescript,产出 JSON 文件到 ```web/`` 文件夹, 需要注意的是, ts2json 跟 web 是不同的服务,需要各启对应的服务

在 ts2json 里启动 ts to json 服务

cd ts2json
npm install 
npm run start

在 web 里启动前端 Vue 服务

cd web
npm install
npm run start

ts2json 目录结构

    |-build // ts2json 的编译配置
    |-src // 在这里写业务,里面有一个简单的 demo 示例,可以按照你的业务需要自由删改
    |-types // 内置的类型约束文件,会随着 VF 持续迭代,如果有遗漏不全可能需要你先自行完善或告知我们
    |-t2j.config.json // ts2json 的配置选项
    |-其他常见配置文件

有关 ts2json 内部详细的配置请见 帮助文档

web 目录结构

   |-build // 常见前端 build 配置
   |-static // 静态资源文件夹
   |-vf-json // 从 ts2json 产出的 json 文件会放在这里
   |-index.html 
   |-index.js
   |-App.vue 

Engine 依赖

目前CLI没有内置 VF 引擎,如需引用请先自行安装。 有关引擎内嵌、更新提醒等功能正在开发

下一步

即将开发的特性

  1. 引擎内嵌
  2. 引擎更新提示
  3. 持续完善 VF Engine 类型校验
  4. CLI 更新提示

其他文档参考

待补充