Skip to main content

A cross-platform tool for merging and processing client-side assets for a web application.

Project description

=====
Blend
=====

Merge, analyze, and optimize client-side assets for web applications and static web sites.

Example
=======

Given the following directory structure::

project
lib
jquery-1.7.2.min.js
src
app.js
components
menu.js
common
helpers.js

And the following ``app.js``::

/* app.js */

//= require jquery
//= require menu
var app = {};

And the following ``menu.js``::

/* menu.js */

//= require jquery
//= require helpers
var menu = {};

And the following ``helpers.js``::

/* helpers.js */

var helpers = {};

Running ``blend`` with no arguments from the ``project`` directory will produce this directory structure::

project
lib
jquery-1.7.2.min.js
output
app.js
app.min.js
menu.js
menu.min.js
src
app.js
components
menu.js
common
helpers.js

Where ``app.js`` has the following content::

/* app.js */

/* ... the minified JQuery code, included only once */
var helpers = {};
var menu = {}
var app = {};

Usage
=====

blend [options] [file1 [file2 [fileN]]]

Command Line Options
--------------------

Output
~~~~~~
``-o OUTPUT, --output=OUTPUT``

Where the file output will be written. The default is a directory at the root of the
project directory named ``output``

Path
~~~~~
``-p PATH, --path=PATH``

A directory to be searched for required files. Multiple directories can specified by
repeating the flag. If you do not
specify any directory with the PATH flag then only the working directory will be searched for required files.

Skip Working Directory
~~~~~~~~~~~~~~~~~~~~~~
``-s, --skipcwd``

Exclude the current working directory from the requirement search paths.

Specify A Configuration File
~~~~~~~~~~~~~~~~~~~~~~~~~~
``-c, --config``

Specify a JSON confguration file that describes the analyzers and minifiers to be used.

Installation
============

From the Python Package Index
-----------------------------
::

pip install blend

From Source
-----------
::

git clone git://github.com/azavea/blend.git
cd blend
python setup.py install

Documentation
=============
http://azavea-blend.readthedocs.org

License
============

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Blend-0.1.2.tar.gz (23.7 kB view details)

Uploaded Source

File details

Details for the file Blend-0.1.2.tar.gz.

File metadata

  • Download URL: Blend-0.1.2.tar.gz
  • Upload date:
  • Size: 23.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Blend-0.1.2.tar.gz
Algorithm Hash digest
SHA256 26f28c19c441ad0373de0f026c6b64b69540d93efe00f3b3529498065b93808b
MD5 ba8399a968b2ba55600102fd593b1eb1
BLAKE2b-256 46127c3f07d1b0a1ae0522ec50f04adb24423de9c0eb49e17aad37854b3443a8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page