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

roo-bid

v1.0.1

Published

袋鼠云前端构建工具

Downloads

13

Readme

roo-bid

袋鼠云Web项目构建工具

Install

npm install -g roo-bid 

Usage

roo-bid create

roo-bid构建流程图

构建流程:

  1. 拉取远程模板信息
  2. 选择需要的远程模板
  3. 判断本地模板仓库是否有这个模板?如有没有进入下一步;如果有,进入覆盖确认,确认覆盖则进入下一步,反之跳到第6步
  4. 输入模板远程仓库中你所需要的分支,默认是master
  5. 下载模板至本地模板库
  6. 进入构建过程
  7. 构建完成,开始你的coding之旅

roo-bid new

  • -c或者--config 指定roo.config.js
  • -d或者--dest 指定模板生成路径
roo-bid new page //新建一个页面
roo-bid new component //新建一个组件

roo.config.js配置示例:

const path=require('path')
module.exports={
  bid:{
    helpers:{
      toLowercase:(str)=>str.toLocaleLowerCase()
    },
    page: {
      output:path.join(__dirname,'src/pages'),
      templates:[
        {
          name:'PageSample',
          src:path.join(__dirname,'templates/pages/PageSample'),
          prompts:[]
        },
        {
          name:'PageReducer',
          src:path.join(__dirname,'templates/pages/PageReducer'),
          prompts:[]
        }
      ]
    },
    component:{
      output:path.join(__dirname,'src/components'),
      templates:[
        {
          name:'ComSample',
          src:path.join(__dirname,'templates/components/ComSample'),
          prompts:[
            {
              type:'input',
              name:'content',
              message:'the content of component'
            }
          ]
        }
      ]
    }
  }
}

helpers

通过helpers属性可以注册Handlebars的helpers。

module.exports = {
  helpers: {
    lowercase: str => str.toLowerCase()
  }
}
{{ lowercase name }}

pages

  • output 页面生成目录
  • templates 可选择构建页面模板列表

templates每一项配置:

  • name 模板名称
  • src 模板路径
  • prompts 构建页面时询问的问题列表,拿到的答案可用于后续的模板渲染,可参照 inquirer

component

  • output 组件生成目录
  • templates 可选择构建组件模板列表

templates每一项配置:

  • name 模板名称
  • src 模板路径
  • prompts 构建页面时询问的问题列表,拿到的答案可用于后续的模板渲染,可参照 inquirer

注: templates每一项配置中的prompts使用示例:

{
  templates:[
    {
      name:'PageSample',
      src:path.join(__dirname,'templates/pages/PageSample'),
      prompts:[{
        type:'input',
        name:'content',
        message:'the content of component'
      }]
    }
  ]
}
{{content}}