I want to compile SASS with sourcemaps for dev mode, and --output-style compressed for production mode.
I introduces a switch in _config.yml
dev: true
Can I access it from Jekyll Asset Pipeline plug-in?
module JekyllAssetPipeline
class CompassConverter < JekyllAssetPipeline::Converter
require 'compass'
require 'tempfile'
def self.filetype
'.scss'
end
def initialize(asset)
@asset = asset
super
end
def convert
output = Tempfile.new('compass_output')
Compass.add_project_configuration({:sourcemap => true})
Compass.configure_sass_plugin!
Compass.compiler.compile("./source/_assets/#{@asset.filename}", output.path)
output.read
end
end
end
For Jekyll::Converter it’s accessible, I believe, via @config. Can JekyllAssetPipeline::Converter make @config accessible by, for example, inheriting from Jekyll::Converter?
I want to compile SASS with sourcemaps for dev mode, and
--output-style compressed
for production mode.I introduces a switch in _config.yml
Can I access it from Jekyll Asset Pipeline plug-in?
For Jekyll::Converter it’s accessible, I believe, via
@config
. Can JekyllAssetPipeline::Converter make@config
accessible by, for example, inheriting from Jekyll::Converter?