Metadata-Version: 1.0
Name: grablib
Version: 0.1.6
Summary: Utility for defining then downloading, concatenating and minifying your project's external static files
Home-page: https://github.com/samuelcolvin/grablib
Author: Samuel Colvin
Author-email: S@muelColvin.com
License: MIT
Description: grablib
        =======
        
        |Build Status| |Coverage Status| |PyPI Status|
        
        Copyright (C) 2013-2015 Samuel Colvin
        
        Python tool and library for downloading, concatenating and minifying
        external static files. Minification works with both javascript via
        `jsmin <https://bitbucket.org/dcs/jsmin/>`__ and css via
        `csscompressor <https://github.com/sprymix/csscompressor>`__.
        
        Definition files can either be JSON or Python (see
        `examples <examples>`__). So the versions of libraries used in your
        project can be defined in version control without the need for files
        from external projects.
        
        CLI Usage
        ---------
        
        Define your static files thus: (``grablib.json``)
        
        .. code:: json
        
            {
              "download_root": "static_files",
              "sites":
              {
                "github": "https://raw.githubusercontent.com",
                "typeahead": "{{ github }}/twitter/typeahead.js/v0.10.2/dist"
              },
              "libs":
              {
                "{{ typeahead }}/typeahead.jquery.js": "js/ta_raw/{{ filename }}",
                "{{ typeahead }}/bloodhound.js": "js/ta_raw/{{ filename }}",
                "{{ github }}/twbs/bootstrap/v3.3.5/dist/css/bootstrap.min.css": "{{ filename }}",
                "{{ github }}/twbs/bootstrap/v3.3.5/dist/js/bootstrap.min.js": "{{ filename }}"
              },
              "minified_root": "static_files/minified",
              "minify":
              {
                "typeahead_combined.min.js": [".*/ta_raw/.*"]
              }
            }
        
        Then download and minify you static files with just:
        
        .. code:: shell
        
            grablib
        
        Library Usage
        -------------
        
        You can also call grablib from python:
        
        .. code:: python
        
            import grablib
        
            grablib.grab('path/to/definitions.json|py')
        
            # or with options overridden
            grablib.grab('path/to/definitions.json|py', verbosity=3)
        
        .. |Build Status| image:: https://travis-ci.org/samuelcolvin/grablib.svg?branch=master
           :target: https://travis-ci.org/samuelcolvin/grablib
        .. |Coverage Status| image:: https://coveralls.io/repos/samuelcolvin/grablib/badge.svg?branch=master
           :target: https://coveralls.io/r/samuelcolvin/grablib?branch=master
        .. |PyPI Status| image:: https://img.shields.io/pypi/v/grablib.svg?style=flat
           :target: https://pypi.python.org/pypi/grablib
        
Platform: any
