anthonyshort / grunt-component-build

Build Components using Grunt.
MIT License
29 stars 12 forks source link

Use the "name" option to define output file names #5

Closed kewah closed 11 years ago

kewah commented 11 years ago

The name option wasn't used until now :)

anthonyshort commented 11 years ago

Do you mean config.name to get the component name? Or were you looking to use it like this?

component: {
  app: {
    name: 'foo',
    scripts: true
  }
}
kewah commented 11 years ago

Like this

component: {
  app: {
    name: 'foo',
    scripts: true
  }
}

=> build/foo.js as output file. Just like -n flag did with component-build.

I think config.name should be used to define the name of the stand-alone global var. But i'll do another PR about that ;)

anthonyshort commented 11 years ago

Ah yeah of course. I've just relying on the target name, eg app, to set the name. I suppose adding it brings it more in line with the actual component build.