Skip to content

firelit/phpmin-js-css

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Overview

This is a quick command line CSS & JS minifier. Designed to be run during the build phase of a web app's deployment. It creates a second version of every .js and .css file (with the extension .min.js and .min.css). It's left up to the dev to decide how to reference these minified versions in production.

It uses the Closure Compilier (by Google) to minify the JavaScript. It uses the CssMin PHP project to minify the css.

Usage

  • Requires PHP >= 5.4 (earlier versions untested)
  • Requires Java (for Closure)

Command Line Format

Specify any options and then specify the files or directories that you'd like the minifier to work through.

php minify.php [options] <file1|dir1> [<file2|dir2> [<...>]]

Command Line Options

  • -r : Recurse through any sub-directories that may be present.

Example

php minify.php -r static/css/ static/js/

License

  • The Closure Compilier is liscensed under Apache 2
  • Everything else is liscensed under MIT

About

A PHP and Java-based command-line minifier for JavaScript and CSS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages