component/builder.js — pull request #62 by karlbohlmark (2013-01-18 15:05:39+00:00)
Title: support requiring json files

I think json support is quite natural, partly because it is supported in npm, but also because in practice, it is a core part of javascript.

My use case:

In my component.json for my tests i have
```json
{
"scripts": [
"index.js",
"test-this.js",
"test-that.js",
"test-alot-more-like-this.js",
"component.json"
]
}
```

and I'd like to be able to do this in `index.js`
```javascript
require('./component').scripts.forEach(function (script) {
require('./' + script);
})
```