Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tpm

Package Overview
Dependencies
Maintainers
3
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tpm

Static Package Manager

  • 1.4.12
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
increased by25%
Maintainers
3
Weekly downloads
 
Created
Source

TPM - Static Package Manager

TPM是前端打包工具。

安装

npm install tpm -g

使用方法

ytpm [COMMAND]

目录结构

src/		# 源代码
	js/
	css/
	img/
build/		# 打包后代码,未压缩
	js/
	css/
dist/		# 压缩后代码
	js/
	css/
	img/

构建JS

ytpm src/js/g.js
ytpm src/js/page/demo.js
ytpm src/js

构建LESS

ytpm src/css/g.less
ytpm src/css/page/demo.less
ytpm src/css

构建图片

ytpm src/img/demo.png
ytpm src/img

压缩打包后的代码

ytpm min build/js/g.js

指定配置

用config参数指定配置,默认用当前目录下的tpm-config.js

ytpm src/js/g.js --config=my-config.js

整理build、dist目录

删除build、dist里的多余的目录和文件。

ytpm cleanup

配置说明

  • main:JS和CSS入口文件。
  • libjs:全局非AMD文件。
  • globaljs:全局入口文件。

Keywords

FAQs

Package last updated on 14 Aug 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc