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

ttm-builder

v1.0.3

Published

前端流程工具

Downloads

1

Readme

##install

git clone http://git.superboss.cc/base/tatami-build.git

cd tatami-build && npm i --registry=https://registry.npm.taobao.org

sudo npm link

这样就安装完成了

##use 进入工作目录

本地开发

ttm -h 查看相关命令
ttm b 编译项目
ttm w watch项目,监听项目自动编译
ttm d 上线前发布
ttm s 启动本地服务器

项目打包详细介绍

线上环境的情况下,我们需要减少资源请求,所以我们使用ttm d进行按需加载打包。即在对应路由下, 只加载当前模块的js资源。
在开发环境下,我们常常使用ttm w,监听项目文件变更,然后自动编译。会自动编译less,js,artTemplate模版,方便我们开发。

关于打包配置 .modelT/下面有两个文件

team.json --- 团队配置 my.json --- 个人配置 (my.json 请加入到.gitignore 里边)

优先个人配置,然后团队配置

默认其实不需要任何配置,除了server

{
    "lessPath":['./resources/css/*.less', '!**/_*.less'],//需要打包的less 文件,默认是css下面所有不是`_`开头的less
    "distDirName": "dist",//输出目录
    "baseURI":""//静态资源输出路径的前缀,没有特殊请不要修改
}

server详细介绍

启动本地开发server

// step1. 需要在项目.modelT/team.json 中配置
{
    "server": {
        "proxyPass": {
            "online": "http://121.43.69.90", // 线上ip地址  注意在json中删掉注释
            "test": "http://121.199.170.10"  // 测试机ip地址
        },
        "replaceMap": {
            "forward\\.jsp$": "/dist/index.html",   // 静态文件替换规则
            "\\.(js|css|png|jpg|html|ttf|woff)$": "/dist"
        },
        "queryStr": "?nick=xx" // 如有必要时增加
    }
}

// step2. 在host中把域名地址指向本机, 如: 127.0.0.1 wdst2.tao21.org

// step3. 执行其中一个指令
ttm s               使用mock数据
ttm s --mode online 代理请求到线上
ttm s --mode test   代理请求到测试服务器

// step4. 在千牛或者浏览器中打开项目地址