cujojs / curl

curl.js is small, fast, extensible module loader that handles AMD, CommonJS Modules/1.1, CSS, HTML/text, and legacy scripts.
https://github.com/cujojs/curl/wiki
Other
1.89k stars 216 forks source link

support `transform` package option #155

Closed unscriptable closed 11 years ago

unscriptable commented 11 years ago

curl 0.7.x supports the moduleLoader config option, but it's misplaced. It currently has to be in a package's config object:

curl({
    packages: [
        { name: 'foo', location: 'here/foo', main: 'bar'
            config: {
                moduleLoader: 'curl/loader/cjsm11'
            }
        }
    ]
});

We'd like to rename it to "transform", and the top level seems like a better place for it:

curl({
    packages: [
        { name: 'foo', location: 'here/foo', main: 'bar', transform: 'curl/loader/cjsm11' }
    ]
});

In a future release, we may allow multiple transforms, but this feature request is just for a single transform.

briancavalier commented 11 years ago

:+1:

unscriptable commented 11 years ago

This will be implemented differently in 0.8.