forked from chenglou/react-dash
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·23 lines (23 loc) · 807 Bytes
/
build.sh
File metadata and controls
executable file
·23 lines (23 loc) · 807 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
clean up previous remains, if any
rm -rf Contents/Resources
rm -rf React.docset
mkdir -p Contents/Resources/Documents
create a fresh sqlite db
cd Contents/Resources
sqlite3 docSet.dsidx 'CREATE TABLE searchIndex(id INTEGER PRIMARY KEY, name TEXT, type TEXT, path TEXT)'
sqlite3 docSet.dsidx 'CREATE UNIQUE INDEX anchor ON searchIndex (name, type, path)'
fetch the whole doc site
cd Documents
wget -m -p -E -k -np http://facebook.github.io/react/
move it around a bit
mv facebook.github.io/react ./
rm -rf facebook.github.io
cd ../../../
change the documentation markup layout a bit to fit dash's small window
node src/modifyDocsHTML.js
read the previously fetched doc site and parse it into sqlite
node src/index.js
bundle up!
mkdir React.docset
cp -r Contents React.docset
cp src/icon* React.docset