https://github.com/sumpygump/mince
Command line build step to automate minifying and combining JavaScript and CSS files.
https://github.com/sumpygump/mince
Last synced: 3 months ago
JSON representation
Command line build step to automate minifying and combining JavaScript and CSS files.
- Host: GitHub
- URL: https://github.com/sumpygump/mince
- Owner: sumpygump
- Created: 2013-02-04T11:29:25.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2019-04-17T14:11:37.000Z (about 6 years ago)
- Last Synced: 2025-01-04T14:17:44.982Z (5 months ago)
- Language: PHP
- Size: 45.9 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mince
Minify and combine your js and css files in a web project: a command line tool written in PHP.
## Installation
### Requirements
- PHP
- jsmin
- csstidyCheckout or download the files into a location on your server or machine. The
following are good locations: `/usr/share/php/mince-1.3` or
`/usr/local/share/php/mince-1.3`### Suggested Installation
cd /usr/local/share/php
git clone git://github.com/sumpygump/mince.git mince-1.3
cd mince-1.3
composer.phar installAdd a symlink to the mince program somewhere in your path
ln -s /usr/local/share/php/mince-1.3/mince /usr/local/bin/mince
chmod a+x /usr/local/bin/mince## Usage
Inside your project folder, create a file called .minceconf. That file will be
in yaml format and contain a list of the minify and/or combine rules.Example file:
minify:
- public/css/global.css
- public/css/admin.css
- public/js/somefile.js
- public/js/anotherfile.js
combine:
public/css/global.cmb.css:
- public/css/global.min.css
- public/css/admin.min.css
public/js/project.cmb.js:
- public/js/somefile.min.js
- public/js/anotherfile.min.jsThis will tell mince to minify the files listed. The minified file written will
be the filename `` + `.min` + ``. For example,
`global.css` will be minified to `global.min.css`.This will also tell mince to combine the minified files into one file. For
example, the first file created will be `public/css/global.cmb.css`, and will
consist of the contents of the files `public/css/global.min.css` and
`public/css/admin.min.css`.Be sure to use paths from the root of the project (where mince will be run).
To perform the mincing, just run "mince" from the command line. It will look
for the file named `.minceconf` and perform the directives indicated therein.## Options
- `mince -v` will run mince with verbose output.
- `mince -q` will run mince in quiet mode (no output).
- `mince --file=filename.yml` will tell mince to look for the minceconf file
`filename.yml` instead of the default `.minceconf`.