Skip to content

Commit

Permalink
Fix js asset-generation
Browse files Browse the repository at this point in the history
  • Loading branch information
ged committed Feb 28, 2013
1 parent e1ffc76 commit a2d4ccc
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions tasks/bootstrap.rb
Expand Up @@ -19,16 +19,21 @@
BOOTSTRAP_RESPONSIVE_LESS = BOOTSTRAP_CSSLIB + 'responsive.less'
BOOTSTRAP_RESPONSIVE = CSSDIR + 'bootstrap-responsive.min.css'

# Order: transition alert button carousel collapse dropdown modal tooltip popover scrollspy tab typeahead
# Dependency Order: transition alert button carousel collapse dropdown modal
# tooltip popover scrollspy tab typeahead

BOOTSTRAP_SOURCES = FileList.new
BOOTSTRAP_MODULES = %w[transition modal tooltip popover typeahead]
BOOTSTRAP_MOD_GLOB = 'bootstrap-{%s}.js' % BOOTSTRAP_MODULES.join(',')
BOOTSTRAP_SOURCES = FileList[ (BOOTSTRAP_JSLIB + BOOTSTRAP_MOD_GLOB).to_s ]
BOOTSTRAP_JS = JSDIR + 'bootstrap.min.js'

BOOTSTRAP_IMGSRC = FileList[ (BOOTSTRAP_IMGLIB + '*.png').to_s ]
BOOTSTRAP_IMAGES = BOOTSTRAP_IMGSRC.pathmap( (IMGDIR + '%f').to_s )

BOOTSTRAP_MODULES.each do |mod|
modfile = BOOTSTRAP_JSLIB + "bootstrap-#{mod}.js"
BOOTSTRAP_SOURCES.include( modfile.to_s )
end


#
# Tasks
Expand Down Expand Up @@ -81,7 +86,7 @@
trace " catenating: #{file}"
source << File.read( file, encoding: 'utf-8' )
end
compressed = Uglifier.compile( source, beautify: $devmode, copyright: true ) << "\n"
compressed = Uglifier.compile( source ) << "\n"

File.write( task.name, compressed, encoding: 'utf-8' )
end
Expand Down

0 comments on commit a2d4ccc

Please sign in to comment.