welldone-software / gulp-durandal

Gulp plugin for building durandaljs projects
MIT License
13 stars 19 forks source link

Support for RequireJS bundles #14

Closed jpchip closed 9 years ago

jpchip commented 9 years ago

I was wondering if it would be possible to implement support for requirejs bundles? It would be really cool if it could automatically create the appropriate output files for any bundles defined in the requirejs config. At the moment the task just throws an error when it encounters a module in a bundle, like:

Durandal Error: ENOENT, no such file or directory 'C:\workspace\company\gitlab\companymarketingsite\app\containers\marketing\index-stuff.js'
In module tree:
    shell
        components/marketing/index
        text
at Object.fs.openSync (fs.js:438:18)

With a bundle defined like so in the requirejs config:

bundles: {
    'index-stuff': ['text!components/marketing/index.html']
}

My end goal would be to have separate bundles for each section of my site, and have those be outputted as separate js files in addition to the main outputted file. Basically like what Steve Sanderson describes in this video at about 37 minutes in: http://vimeo.com/97519516

derkan commented 9 years ago

+1 for bundle support as defined in gulp-requirejs-bundler module.

danikenan commented 9 years ago

We are not familiar with the bundling feature and are not using it. You are more than welcome to fork, add the support and create a pull request. We will check, and if ok, will integrate your code.