🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

oojs-tool

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oojs-tool

the node-oojs tool for web development. Gzip/Compress js , css, etc...

latest
Source
npmnpm
Version
1.0.5
Version published
Weekly downloads
1
-92.31%
Maintainers
1
Weekly downloads
 
Created
Source

#oojs-tool oojs命令行工具, 可以用于js, css文件的 代码格式化, 代码压缩, gzip压缩等.

##安装

  • 安装node. 在官网 http://nodejs.org 根据自己的系统安装
  • npm install -g oojs-tool

##使用

js文件工具:

oojs js a.js //进行js代码压缩, 输出 a.compress.js
oojs js a.js -o b.js //进行js代码压缩, 输出 b.js
oojs js a.js -format //进行js代码格式化, 输出 a.format.js
oojs js a.js -format -o b.js //进行js代码格式化, 输出 b.js

css文件工具:

oojs css a.css //进行css代码压缩, 输出 a.compress.css
oojs css a.css -o b.css //进行css代码压缩, 输出 b.css
oojs css a.css -format //进行css代码格式化, 输出 a.format.css
oojs css a.css -format -o b.css //进行css代码格式化, 输出 b.css

gzip工具:

oojs gzip a.js //进行gzip压缩, 输出 a.js.gz
oojs gzip a.js -o b.js //进行gzip压缩, 输出 b.js
oojs gzip a.js -c 5 //进行gzip压缩, 输出 a.js.gz, 压缩等级为5. 默认值为9(最高压缩率)

智能工具, 自动判断文件类型, 同时输出代码压缩文件, 代码格式化文件和gzip文件:

oojs smart a.js //输出: a.compress.js, a.format.js, a.js.gz
oojs smart a.css //输出: a.compress.css, a.format.css, a.css.gz

FAQs

Package last updated on 11 Sep 2014

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