Cup

From ruby:

Cup.build Cup.cup_name Cup.minified Cup.concatenated Cup.version

CLI helper output

  • INSERT HERE

Features

  • Automatically includes javascripts, easy DSL for customizing their order

    but NOT from inside spec/visuals1

  • can uglify your project cup build ** concatenates lib*/.js and src/*/.js into unminified and minified outputs in ./build

  • cup serve ** landing page for all serve capabilities ** serve specs in concatenated and debug modes ** serve visual spec index and serve spec/visual/*/.spec.erb ** includes all css files in every request ** sinatra server extendable by add server do <sinatra endpoints> end to the Cupfile

@pages ||= { :root => Page.new.tap do |page| page.path = '/' page.name = 'root' page.template = :root page.description = 'List of available pages' end, :debug => Page.new.tap do |page| page.path = '/debug' page.name = 'debug' page.template = :debug page.description = 'Headed page with lib and src javascript included' end, :empty => Page.new.tap do |page| page.path = '/empty' page.name = 'empty' page.template = :debug page.options[:layout] = false page.description = 'Totally blank page with lib and src javascript included' end, :spec => Page.new.tap do |page| page.path = '/spec' page.name = 'specs' page.template = :spec page.options[:javascripts_scheme] = :spec page.description = 'Run Jasmine specs on lib and src' end, :spec_concatenated => Page.new.tap do |page| page.path = '/spec/concatenated' page.name = 'specs on build output' page.template = :spec page.options[:javascripts_scheme] = :spec_concatenated page.description = 'Run Jasmine specs on the build output' end, :spec_minified => Page.new.tap do |page| page.path = '/spec/minified' page.name = 'specs on minified build output' page.template = :spec page.options[:javascripts_scheme] = :spec_minified page.description = 'Run Jasmine specs on minified build output' end, :spec_visual => Page.new.tap do |page| page.path = '/spec/visual' page.name = 'visual specs' page.template = :spec page.description = 'View available visual specs' end }

  • uglified options overridable in Cupfile before_build and after_build hooks are available too
  • requires git