Fork me on GitHub

stonebear

build and deployment tool for developing websites and web applications

What is stonebear?

stonebear is a build and deployment tool targeted for web-developers. It can ease the task of readying (minifying, uglifying, obfuscating, reducing, optimizing ...) all your HTML, CSS and Javascript, your image-files and whatever you would like. stonebear is made in a way that makes it easy to do whatever you would like it to.

How do I get it?!

stonebear is available via the python package manager pip.

$ pip install stonebear

How does it work?

You tell stonebear what to do by creating a stonebeard.py config file and put it in the directory that you want to use stonebear from

config = {
    'compilers': [
        [
            ['*.jpg', '*.jpeg'],
            'jpegoptim {file}'
        ],
        [
            ['*.png'],
            'optipng {file}'
        ],
        [
            ['*.html', '*.htm'],
            'htmlcompressor -o {file} {file}'
        ],
        [
            ['*.js'],
            'uglifyjs -o {file} {file}'
        ],
        [
            ['*.css'],
            'yuicompressor -o {file} {file}'
        ]
    ],

    'input':  ['src'],
    'output': ['build'],

    'remove_from_output_dirs': [
        '*.psd',
        '.*.swp',
        '.DS_Store'
    ],

    'environments': {
        'development': """
            rsync -azv --delete build/ /var/www
        """,
        'production': """
            rsync -azv --delete build/ -e ssh user@host:/var/www
        """
    }
}

from there on, you can build, push and clean your code

$ stonebear build
copy src/ to build/, runs compilers on files and removes unwanted files

$ stonebear push production
push build/ to production environment

$ stonebear clean
remove build/

or you can do it all at once

$ stonebear deploy production