Skip to content

Broccoli build and serve tasks for Grunt task runner

Notifications You must be signed in to change notification settings

mmun/grunt-broccoli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

grunt-broccoli

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.

Build in tasks

Built in tasks broccoli:serve && broccoli:build:{outputDir} look for Broccoli.js in working directory and execute it.

broccoli:build:{outputDir}

If you don't specify {outputDir} directory, then it will write to default build directory.

broccoli:serve

Start Broccoli server.

Custom Tasks

broccoli:{customTaskName}:build

Build Broccoli output

broccoli:{customTaskName}:serve

Serve your Broccoli output

broccoli: {

      withFunction: {
        // method bound to task
        config: brocFunction
        src: 'examples',
        dest: 'output'
      },

      withRequire: {
        options: {
          config: require('./examples/Brocfile2')
        },
        src: 'examples',
        dest: 'output'
      },

      withArray: {
        options: {
          config: [ './examples/Brocfile.js', brocFunction, require('./examples/Brocfile2') ]
        },
        src: 'examples',
        dest: 'output'
      }

    }

  });

  function brocFunction(broccoli) {

    var tree = this.data.src;

    return tree;
  }

About

Broccoli build and serve tasks for Grunt task runner

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published