Improve Grunt scraper

pull/656/head
Thibaut Courouble 8 years ago
parent 05f2a6628c
commit 9d53de6a59

@ -1,10 +1,5 @@
#= require views/pages/base #= require views/pages/base
class app.views.JavascriptPage extends app.views.BasePage
prepare: ->
@highlightCode @findAllByTag('pre'), 'javascript'
return
class app.views.JavascriptWithMarkupCheckPage extends app.views.BasePage class app.views.JavascriptWithMarkupCheckPage extends app.views.BasePage
prepare: -> prepare: ->
for el in @findAllByTag('pre') for el in @findAllByTag('pre')
@ -15,9 +10,6 @@ class app.views.JavascriptWithMarkupCheckPage extends app.views.BasePage
@highlightCode el, language @highlightCode el, language
return return
app.views.GruntPage =
app.views.JavascriptPage
app.views.DojoPage = app.views.DojoPage =
app.views.RequirejsPage = app.views.RequirejsPage =
app.views.JavascriptWithMarkupCheckPage app.views.JavascriptWithMarkupCheckPage

@ -30,6 +30,7 @@ app.views.ExpressPage =
app.views.FlowPage = app.views.FlowPage =
app.views.GithubPage = app.views.GithubPage =
app.views.GoPage = app.views.GoPage =
app.views.GruntPage =
app.views.ImmutablePage = app.views.ImmutablePage =
app.views.InfluxdataPage = app.views.InfluxdataPage =
app.views.JasminePage = app.views.JasminePage =

@ -19,6 +19,7 @@ module Docs
# Remove code highlighting # Remove code highlighting
css('pre').each do |node| css('pre').each do |node|
node.content = node.content node.content = node.content
node['data-language'] = 'javascript'
end end
doc doc

@ -3,7 +3,7 @@ module Docs
self.name = 'Grunt' self.name = 'Grunt'
self.type = 'grunt' self.type = 'grunt'
self.release = '1.0.1' self.release = '1.0.1'
self.base_url = 'http://gruntjs.com/' self.base_url = 'https://gruntjs.com/'
self.root_path = 'getting-started' self.root_path = 'getting-started'
self.initial_paths = %w(api/grunt) self.initial_paths = %w(api/grunt)

Loading…
Cancel
Save