Coder Social home page Coder Social logo

grunt-broccoli's Introduction

grunt-broccoli Build Status

Allows you to execute your Broccoli configurations as Grunt tasks. Broccoli is an asset pipeline that allows for incremental builds. Broccoli rebuilds individual files instead of the entire project as Grunt watch does. Checkout the Broccoli Sample App.

Running your tasks

grunt-broccoli is a multi-task so you must specify a target when running the task.

Building to a directory

grunt broccoli:{targetName}:build

Watching for changes and re-building to a directory

grunt broccoli:{targetName}:watch

Running the Broccoli server

grunt broccoli:{targetName}:serve

Configuring your tasks

You can configure these settings (see examples below):

config: [String or Function] If a string, it refers to the location of the Brocfile relative to the current working directory. If a function, it expects that the return value is a Broccoli-compatible tree. Defaults to 'Brocfile.js'.

dest: [String] Specifies the output folder. This doesn't affect the serve command. The build and watch commands will abort if a dest directory is not set.

host/port: [String]/[Number] Specifies the host and port that the Broccoli server runs on. This only affects the serve command. Defaults to localhost and 4200.

env: [String] Set the BROCCOLI_ENV to use (see broccoli-env).

Examples

broccoli: {
  dist: {
    dest: 'dist',
    config: function() {
      var transpiled = transpileTree('lib');
      var allFiles = mergeTrees([transpiled, 'vendor']);
      var concated = concatFiles(allFiles);
      var uglified = uglifyFiles(concated);
      return uglified;
    }
  },

  dev: {
    dest: 'tmp/tests',
    config: 'brocfiles/development.js',
    port: 4201
  }
}

grunt-broccoli's People

Contributors

dremora avatar gabro avatar joliss avatar kmiyashiro avatar lcmen avatar ming-codes avatar mmun avatar rixth avatar samu avatar taras avatar thomasboyt avatar valpackett avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.