jasmine / jasmine-gem

Jasmine ruby gem
681 stars 275 forks source link

Concat assets #240

Closed ahuth closed 8 years ago

ahuth commented 9 years ago

Is there a way to get Jasmine to concat an app's assets together?

We're in the middle of upgrading a large Rails app from Jasmine 1.2 to 2.2.0. Our app has several thousand CoffeeScript files, and under the old version of Jasmine we would get our entire application manifest bundled together as one file.

After upgrading, we're getting each file served up individually, which takes a long time because there are so many.

Thanks.

EDIT: I already tried configuring Rails to not use debug mode for assets during testing. Didn't work.

slackersoft commented 9 years ago

Jasmine explicitly puts it's local version of sprockets into debug mode in order to ensure we get the files split out. We do this because most users find it easier to debug their failures when the stack traces go to the original files and not a concatenated version.

I could certainly see having an option to configure the jasmine server to put sprockets into non-debug mode, as long as debug stays as the default option. We'd be happy to review a pull request that added an option to the jasmine configuration (jasmine.yml or programmatic in Jasmine::Configuration) to serve concatenated assets.

ahuth commented 9 years ago

Yeah, I agree that most of the time it makes sense to be in debug mode. Was hoping that there was an option I was missing.

I'll look into doing a PR, and thanks for responding to this.

ahuth commented 9 years ago

Any thoughts on PR #241, @slackersoft?

Thanks.