android.moparisthebest.org/plugins/js_assets.rb
Brandon Mathis 7bdab0e65c Added javascript asset management and improved Rakefiles and configuration for themes and plugins.
- Added Guard for file watching
- Configs can be automatically reloaded
- Static asset changes do not trigger Jekyll build
- CommonJS modular js support proved by stich-rb
- Javascript is concatenated and uglified
- Environment variables toggle uglify and fingerprinting
- New Jekyll plugin config_tag
- New Jekyll plugin javascript_assets_tag
- Added theme specific configurations
- Custome Jekyll Guard to the rescue
- Install, Generate, Watch, and Preview work with Guard now.
- Now configs are no longer tracked by Octopress, only theme defauts are.
- Console messages can be colorized.
- misc config reorganization and improvements
2013-03-04 01:12:10 -06:00

17 lines
417 B
Ruby

$:.unshift File.expand_path("../lib", File.dirname(__FILE__)) # For use/testing when no gem is installed
require 'octopress'
class JavascriptAssets < Liquid::Tag
def initialize(tag_name, options, tokens)
super
end
def render(context)
js_assets = Octopress::JSAssetsManager.new
js_assets.compile
js_assets.url
end
end
Liquid::Template.register_tag('javascript_assets_tag', JavascriptAssets)