File tree Expand file tree Collapse file tree 3 files changed +1
-55
lines changed
Expand file tree Collapse file tree 3 files changed +1
-55
lines changed Original file line number Diff line number Diff line change @@ -53,49 +53,3 @@ var examples = tree(
5353fs . writeFileSync ( __dirname + '/../build/examples.json'
5454 , JSON . stringify ( examples , null , 2 )
5555)
56-
57- console . error ( )
58- console . error ( 'extracting packages' )
59-
60- var packages = tree (
61- fs . readFileSync ( path . join ( __dirname , 'packages.md' ) , 'utf8' )
62- ) . children [ 0 ]
63- . children
64- . reduce ( function ( list , category ) {
65- category . text = unhtml ( category . text )
66-
67- list [ category . text ] = category . children . map ( function ( pkg , i ) {
68- pkg . tokens . links = { }
69-
70- var name = unhtml ( pkg . text )
71- var html = marked . Parser . parse ( pkg . tokens )
72- var thumb = 'default.jpg'
73-
74- var $ = cheerio . load ( html )
75-
76- $ ( 'img' ) . each ( function ( i , img ) {
77- var $img = $ ( img )
78- thumb = $img . attr ( 'src' )
79- $img . parent ( ) . remove ( )
80- } )
81-
82- var desc = $ . html ( )
83-
84- console . error ( '*' , category . text , '/' , name )
85-
86- return {
87- name : name
88- , desc : desc
89- , link : 'http://ghub.io/' + name
90- , thumb : thumb || ''
91- , featured : false
92- , i : i
93- }
94- } )
95-
96- return list
97- } , { } )
98-
99- fs . writeFileSync ( __dirname + '/../build/packages.json'
100- , JSON . stringify ( packages , null , 2 )
101- )
Original file line number Diff line number Diff line change @@ -7,9 +7,7 @@ var fs = require('fs')
77
88var wiki = 'https://github.com/stackgl/stackgl.github.io/wiki/'
99
10- ; [ 'examples'
11- , 'packages'
12- ] . forEach ( function ( slug ) {
10+ ; [ 'examples' ] . forEach ( function ( slug ) {
1311 var Slug = slug . slice ( 0 , 1 ) . toUpperCase ( ) + slug . slice ( 1 )
1412 var uri = url . resolve ( wiki , Slug )
1513 var dst = path . join ( __dirname , slug + '.md' )
Original file line number Diff line number Diff line change @@ -44,12 +44,6 @@ <h2>examples & demos</h2>
4444 < ul class ="thumb-list "> </ ul >
4545 </ section >
4646
47- < section id ="packages " class ="section cf ">
48- < h2 > packages</ h2 >
49- < ul class ="thumb-filter "> </ ul >
50- < ul class ="thumb-list "> </ ul >
51- </ section >
52-
5347 < section id ="community " class ="section cf " data-fill >
5448 < div id ="community-content ">
5549 < h2 > community</ h2 >
You can’t perform that action at this time.
0 commit comments