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

tm-cli

v0.5.11

Published

> tm-cli v0.5.0 配置API进行大量优化

Downloads

15

Readme

tm-cli

tm-cli v0.5.0 配置API进行大量优化

注意事项

  • 老项目生产环境建议用 0.2.0-beta.14 版本构建项目,防止意外构建产生bug!0.2.x 中文文档

安装环境

  • node v14.16.1+,npm6.14.12+

使用

// 全局安装
npm i -g tm-cli

// 查看命令
tm

命令参数说明

- tm 查看全部命令
- tm -v 查看版本
- tm i 初始化项目模板选择,构建新的项目(以中后台项目为主)
- tm start 开发环境 默认打开 http://localhost:9090。可选参数 -e 可添加自定义  process.env.APP_ENV 的值,可作为区分应用环境。同时 process.env 中默认内置了版本号的标记和构建时间戳的标记
- tm start --speed --dll 开发环境-极速模式 
    - 需要index.html中引入外部js css资源 比如 vue.libs.js (vue全家桶依赖库)、vendors.js (第三方依赖库)、element-ui 2.13.0.js 等
    - index.html 加入
    ```
    <!--开发环境-dll使用-->
      <% if (htmlWebpackPlugin.options.isDll) {%>
      <script type="text/javascript" src="./dll/common.dll.js"></script>
      <% } %>
    ```
    - tm.config.js
    ```
    // 常用第三方包且不修改开启dll
    dll: ['axios','moment','echarts']
    ```
- tm build  部署构建打包,生成dist目录。可选参数 -e 同上
- tm build --speed 部署环境-极速模式
    -  需要index.html中引入外部js css资源 比如 vue.libs.js (vue全家桶依赖库)、vendors.js (第三方依赖库)、element-ui 2.13.0.js 等
- tm watch 开发环境 watch 模式
- tm ssr SSR服务构建打包
- tm mock 本地简单静态服务和 http API 模拟服务
- tm dll 单独构建dll文件
- tm eslint 自动生成统一的eslint, prettier, git hooks配置
- tm update 版本检测更新
- 项目初始化浏览器控制台会打印 process.env 中的配置信息比如版本、构建时间