Commit e8bdb81c authored by Aral Balkan's avatar Aral Balkan

Integrate EasyList converter into Builder.

parent f73e76a3
......@@ -35,6 +35,8 @@ Cache = require './Cache2'
Promise = require 'thrush'
WebkitContentBlockerRulesToEasyList = require './WebkitContentBlockerRulesToEasyList'
class Builder
instance = null
......@@ -129,20 +131,26 @@ class Builder
# @info 'Rendering content…'
blockdown = new Blockdown
easyListConverter = new WebkitContentBlockerRulesToEasyList
blockdown.renderDataForSite()
.then =>
@info "\t✓ Rendered content for site."
blockdown.renderDataForApp()
.then =>
@info "\t✓ Rendered content for data."
duration = ((new Date) - startTime)
durationUnit = "ms"
if duration > 1000
duration = duration / 1000
durationUnit = "seconds"
@info "\t✓ Render complete. (#{duration} #{durationUnit})"
easyListConverter.convert()
.then =>
@info "\t✓ Rendered EasyList version."
duration = ((new Date) - startTime)
durationUnit = "ms"
if duration > 1000
duration = duration / 1000
durationUnit = "seconds"
@info "\t✓ Render complete. (#{duration} #{durationUnit})"
#
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment