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

@tbuilder/core

v0.0.18

Published

DSL parser,compiler,generator and more base power package

Downloads

7

Readme

@tbuilder/core

tBuilder是一个通过DSL来自动快速生成前端项目的编译器,提供通过同一份DSL编译到不同目标平台(vue,h5,小程序等)的能力

核心库安装

npm i @tbuilder/core

核心库使用

import TBuilder from '@tbuilder/core'

const builder = new TBuilder(finalPath)

builder.compile()
builder.generate()

TBuilder类

| 方法 | 参数 | 说明 | | - | - | - | | new(dsl: string | object) | dsl: dsl文件路径或dsl对象 | 创建实例 | | compile() : tBuilderAST | - | 返回通过dsl解析生成的AST | | generate() : Promise | - | 通过DSL创建前端项目 |

tBuilder DSL

{
  "project": {
    "name": "测试项目",
    "version": "0.0.1",
    "description": "一个测试用的项目",
    "author": "tBuilder",
    "compileTarget": "vue",
    "uiLib": "iView",
    "dist": "/Users/inlost/Downloads/tBuilder"
  },
  "pages": [{
    "name": "test page",
    "route": "/test",
    "components": [{
      "name": "Card",
      "props": [{
        "key": "bordered",
        "value": false
      }, {
        "key": "shadow",
        "value": true
      }],
      "children": [{
        "name": "p",
        "props": [{
          "key": "slot",
          "value": "title"
        }],
        "content": "No border title"
      }, {
        "name": "p",
        "content": "Content of no border type. Content of no border type. Content of no border type. Content of no border type."
      }],
      "content": "test content"
    }]
  }],
  "dataModules": [{
    "name": "test module",
    "apis": [{
      "name": "test api1",
      "path": "/api/test/api1",
      "method": "GET",
      "share": true,
      "has_param": true
    }, {
      "name": "test api2",
      "path": "/api/test/api2",
      "method": "POST",
      "share": false,
      "has_param": false
    }]
  }, {
    "name": "test test module",
    "apis": [{
      "name": "test api3",
      "path": "/api/test/api3",
      "method": "POST",
      "share": true,
      "has_param": true
    }]
  }]
}

tBuilder cli

生成项目的命令行工具

详见@tBuilder/cli

插件扩展

TODO


Generated by tmaker.