Cassette and AMD

58 views
Skip to first unread message

Weston Weems

unread,
Oct 15, 2014, 1:25:17 PM10/15/14
to cass...@googlegroups.com
I've used both asp.net and cassette minification and bundling before and been rather content with both.

Now I am trying to ensure I'm covering all the bases particularly AMD, and kinda finding differing schools of though as it pertains to cassette.

Seems like some people just include requirejs and then add it as a scriptbundle and then include requirejs config and go from there... others have libraries to do it. I even found nuget packages for cassette.requirejs but can find no reference as to what it specifically does or doesnt do.

Is there an automated way to basically say this script/script bundle relies on this script/script bundle and have it build configs that requirejs or some other module needs?

I've also seen other tools liek gulp/browserify but seems like those would have some pretty significant infrastructure requirements on my build servers (setting up npm/gulp/necessary plugins) etc.

Looking for any pointers or tips, for specifically cassette, or other mechanisms that would do a better job for .net.

Thanks for the time!

Weston Weems

unread,
Oct 17, 2014, 2:25:11 PM10/17/14
to cass...@googlegroups.com
https://github.com/andrewdavey/cassette/issues/248

Save to assume that based on that post, AMD/RequireJS isnt there, and probably wont be for the foreseable future?

Andrew, was there some deal breaker you ran into in the implementation of this, or just never moved it past experimentation? Even if it wasnt true AMD, and was just module dependencies, that would be absolutely huge.

Weston Weems

unread,
Oct 17, 2014, 4:57:53 PM10/17/14
to cass...@googlegroups.com
Ahh I found reference how to do this on someones blog. Thanks!


On Wednesday, October 15, 2014 10:25:17 AM UTC-7, Weston Weems wrote:

Jason Warner

unread,
Oct 17, 2014, 5:04:08 PM10/17/14
to cass...@googlegroups.com, Weston Weems
Would you care to share what you found? I've been dabbling in node and
really like the var x = require('x'); type dependency handling. I would
like to keep Cassette's minification and bundling also.

Jason

On 10/17/2014 2:57 PM, Weston Weems wrote:
> Ahh I found reference how to do this on someones blog. Thanks!
>
> On Wednesday, October 15, 2014 10:25:17 AM UTC-7, Weston Weems wrote:
>
> I've used both asp.net <http://asp.net> and cassette minification
> and bundling before and been rather content with both.
>
> Now I am trying to ensure I'm covering all the bases particularly
> AMD, and kinda finding differing schools of though as it pertains
> to cassette.
>
> Seems like some people just include requirejs and then add it as a
> scriptbundle and then include requirejs config and go from
> there... others have libraries to do it. I even found nuget
> packages for cassette.requirejs but can find no reference as to
> what it specifically does or doesnt do.
>
> Is there an automated way to basically say this script/script
> bundle relies on this script/script bundle and have it build
> configs that requirejs or some other module needs?
>
> I've also seen other tools liek gulp/browserify but seems like
> those would have some pretty significant infrastructure
> requirements on my build servers (setting up npm/gulp/necessary
> plugins) etc.
>
> Looking for any pointers or tips, for specifically cassette, or
> other mechanisms that would do a better job for .net.
>
> Thanks for the time!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Cassette" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to cassette+u...@googlegroups.com
> <mailto:cassette+u...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

Weston Weems

unread,
Oct 20, 2014, 12:27:52 PM10/20/14
to cass...@googlegroups.com, wwe...@gmail.com
Apologies... its not so much amd, but more of just adding a dependecy to a bundle like so

   bundles.Add<ScriptBundle>("~/bundles/somepage",
                                        new[]
                                        {
                                            "~/scripts/somepageviewmodel.js",
                                            

                                        },bundle=>bundle.AddReference("~/bundles/core"));

Rendering scripts() for just the somepage bundle will suck in the prerequisites.
Reply all
Reply to author
Forward
0 new messages