- easy method to combine multiple files into single asset request
- automated minification/optimization
- Mac OS X (currently using fsevents to track file changes. will later add support for Linux and Windows)
Python Packages Used
- jsmin (http://pypi.python.org/pypi/jsmin)
- macfsevents (http://pypi.python.org/pypi/MacFSEvents/0.2.1)
- virtualenv (http://pypi.python.org/pypi/virtualenv)
- argparse (http://pypi.python.org/pypi/argparse)
MASS can be installed via pip:
pip install mass
To install MASS manually, clone the repo and install using setup.py:
python setup.py install
MASS comes with the necessary python packages via virutalenv by default.
Before installing MASS, users can enable virtualenv by navigating to the repository and sourcing the virtual environment.
cd path/to/MASS source env/bin/activate
// foo.xjs // import "foo.js" // import "plugins/jquery.jnotify.js"
Require commands can be used to ensure that a file has been already been imported, and will import the script if they have not.
// foo.xjs // import "foo.js" // import "bar.js" // foo.js // require "bar.js"
In the above example, bar.js will not be re-imported since foo.xjs has already imported it.
Mass has two basic CLI commands, watch and compile. watch begins monitoring the specified directory and will compile files as they are edited while compile will simply minify and combine files located in the specified directory.
mass watch -s path/to/source mass compile -s path/to/source
Defining Destination Directory
By default, MASS saves the compiled js files in the same directory as the source files. The -d argument can be used to specify a different output directory.
mass watch -d path/to/output
Defining Source Directory
If a source directory is not specified, MASS uses the current directory by default. The -s argument can be used to specify the directory for MASS to discover files.
mass watch -s path/to/source -d path/to/output
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size mass-0.1.4.tar.gz (4.9 kB)||File type Source||Python version None||Upload date||Hashes View|