segment-boneyard / component-jade

A plugin to transpile Jade files for the component builder.
12 stars 8 forks source link

no method 'map' when run as part of grunt-component-build #15

Open charypar opened 10 years ago

charypar commented 10 years ago

Version 1.0.0 fails to build components when used from grunt-component-build like so

configure_component = (builder) ->
    builder.use require('component-jade')('templates', string: true)

   ...

componentbuild:
  components:
    options:
      name: 'main'
      configure: configure_component

Here is a backtrace

Warning: Object #<Builder> has no method 'map' Use --force to continue.
TypeError: Object #<Builder> has no method 'map'
  at /vagrant/node_modules/component-jade/index.js:26:11
  at Builder.use (/vagrant/node_modules/grunt-component-build/node_modules/component-builder/lib/builder.js:873:3)
  at configure_component (/vagrant/Gruntfile.coffee:9:13)
  at /vagrant/node_modules/grunt-component-build/lib/build.js:66:25
  at /vagrant/node_modules/grunt-component-build/tasks/component_build.js:37:9
  at iterate (/vagrant/node_modules/grunt-component-build/node_modules/async/lib/async.js:134:13)
  at Object.async.eachSeries (/vagrant/node_modules/grunt-component-build/node_modules/async/lib/async.js:150:9)
  at build (/vagrant/node_modules/grunt-component-build/tasks/component_build.js:35:13)
  at iterate (/vagrant/node_modules/grunt-component-build/node_modules/async/lib/async.js:134:13)
  at Object.async.eachSeries (/vagrant/node_modules/grunt-component-build/node_modules/async/lib/async.js:150:9)
  at Object.<anonymous> (/vagrant/node_modules/grunt-component-build/tasks/component_build.js:49:11)
  at Object.<anonymous> (/vagrant/node_modules/grunt/lib/grunt/task.js:264:15)
  at Object.thisTask.fn (/vagrant/node_modules/grunt/lib/grunt/task.js:82:16)
  at Object.<anonymous> (/vagrant/node_modules/grunt/lib/util/task.js:282:30)
  at Task.runTaskFn (/vagrant/node_modules/grunt/lib/util/task.js:235:24)
  at Task.<anonymous> (/vagrant/node_modules/grunt/lib/util/task.js:281:12)
  at Task.<anonymous> (/vagrant/node_modules/grunt/lib/util/task.js:215:7)
  at Task.runTaskFn (/vagrant/node_modules/grunt/lib/util/task.js:238:9)
  at Task.<anonymous> (/vagrant/node_modules/grunt/lib/util/task.js:281:12)
  at Task.<anonymous> (/vagrant/node_modules/grunt/lib/util/task.js:215:7)
  at [object Object]._onTimeout (/vagrant/node_modules/grunt/lib/util/task.js:225:33)
  at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)
ianstormtaylor commented 10 years ago

are you using the latest version of the builder? i don't know anything about grunt so i can't help there

azhang commented 10 years ago

anthonyshort/grunt-component-build / package.json has "component-builder": "0.10.x", which is why this isn't working.