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 🙏

© 2026 – Pkg Stats / Ryan Hefner

ttpai

v0.1.21

Published

天天拍车前端集成工具

Readme

#ttpai

天天拍车前端集成工具

  • 1.安装
sudo npm install -g ttpai
  • 2.在项目根目录建立key.js文件(主要用于远程主机ssh登录的密码端口等)
module.exports = {
    "server": {
        "100": {
            "declare": "test",
            "host": "192.168.0.100",
            "port": 2208,
            "username": "root",
            "password": "123456"
        }
    },
    "tinifyKey": []
}
  • 3.创建一个 webpack 项目(或者创建一个空项目 ttp -p projectname)
ttpai -p 2015.ttpai.cn h5|pc|boss
  |--news
  |----pages
  |------2015.ttpai.cn
  |--------common
  |----------fonts
  |----------images
  |----------js
  |----------less
  |--------components
  |--------data
  |--------dialog
  |--------modules
  |----------meta
  |------------meta.hbs
  |--------src
  |----------entry
  |------------index.js
  |----------html
  |----------images
  |----------less
  |------------index.less
  |----------temp
  |------------index.hbs
  |--------.eslintrc
  |--------gulpfile.js
  |--------webpack.config.dist.js
  |--------webpack.config.js
  
  • 4.项目发布命令:ttpai -r|-release(登录远程主机并切换git仓库)
#开发环境发布命令
ttpai -r 151 dev
ttpai -release 151 dev
 
#测试/模拟环境发布命令
ttpai -r 91 test
 
#灰度环境发布命令
ttpai -r 82 release
  • 5.登录远程主机执行上线部署任务
#已废弃,目前前端上线由运维控制
ttpai -d
ttpai -deploy
  • 6.使用'ttpai'工具编译 webpack 项目
#webpack 等价于以下命令
ttpai -b
ttpai -b dev
ttpai -b dev all
ttpai -build
 
#webpack -w  等价于以下命令
ttpai -b -w
ttpai -b dev -w
ttpai -b dev all -w
 
#webpack --config webpack.config.dist.js  等价于以下命令
ttpai -b dist
ttpai -b dist all
 
#webpack --config webpack.config.dist.js -w  等价于以下命令
ttpai -b dist -w
ttpai -b dist all -w
 
#编译特定配置文件 data/webpack.config.options.cby.js
ttpai -b cby
ttpai -b dev cby
  
ttpai -b cby -w
ttpai -b dev cby -w
 
ttpai -b dist cby
ttpai -b dist cby -w

#图片压缩功能,默认压缩项目下“./dist/images”和“./common/images”下的所有图片
ttpai -b min_pic

#图片压缩功能,压缩自定义目录下的文件
ttpai -b min_pic ./dist/images