Socket
Book a DemoInstallSign in
Socket

bygg

Package Overview
Dependencies
Maintainers
3
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bygg

Taking the pain out of front-end build systems

latest
Source
npmnpm
Version
1.2.0
Version published
Weekly downloads
6
100%
Maintainers
3
Weekly downloads
 
Created
Source

Bygg

Taking the pain out of front-end build systems

Ever feel like existing front-end build systems just get in your way? Say hello to Bygg. The basic primitive isn't a single file, but a tree of files, and you simply compose plugins into a graph that defines your build pipeline. Bygg takes care of the rest. By leveraging functional reactive programming only the part of the pipeline that actually changed is recomputed, and you'll see the result in your browser just milliseconds later. No need to worry about live-reload, source maps, or bending your build system to fit revving into the picture; Bygg's got you covered.

Documentation

Check out the examples to get started.

Sample byggfile.js

This file is just a quick sample to give you a taste of what Bygg does.

var bygg = require('bygg');

var autoprefixer = require('bygg-plugins/autoprefixer');
var csswring = require('bygg-plugins/csswring');
var rev = require('bygg-plugins/rev');
var serve = require('bygg-plugins/serve');
var stats = require('bygg-plugins/stats');
var uglify = require('bygg-plugins/uglify');

bygg.task('serve', function (optimize) {
    return build(optimize)
        .pipe(bygg.write('build/'))
        .pipe(serve(3000));
}, [{ name: 'optimize', default: false, flag: true, abbr: 'o' }]);

bygg.task('build', function (optimize) {
    return build(optimize)
        .pipe(bygg.write('build/'))
        .pipe(stats());
}, [{ name: 'optimize', default: true, flag: true, abbr: 'o' }]);

var build = function (optimize) {
    var html = bygg.files('*.html');

    var styles = bygg
        .files('app.css')
        .pipe(autoprefixer('last 2 versions', 'ie 9'))
        .pipe(optimize ? csswring() : bygg.noop());

    var scripts = bygg
        .files('app.js')
        .pipe(optimize ? uglify() : bygg.noop());

    return bygg.combine(
        html,
        styles,
        scripts
    )
    .pipe(optimize ? rev() : bygg.noop());
};

FAQs

Package last updated on 26 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts