- checking in
bundle.jsto allow running this in github pages - removing hyperwatch
- removing line numbers from rendered code
- minor fixes to make the app work statically
- replacing
textareawithbraceeditor and adjusting styles
- editing
index.cssand addingnpm startscript inpackage.json
- updating rendered markdown when user edits textarea (
init.jslines: 13-21) - removed
require('fs')workaround that had been there due to a bug inbrowser-builtins-- not important
-
removing
{MARKDOWN}placeholder and simply servingindex.htmlas-is server side -
adding
init.jswhich usesfs.readFileSyncto load theREADME.mdon the client side -
installing
brfsand adding the transform to inlineREADME.mdtext -
it then inserts the rendered markdown into the
div.renderand the original text intotextarea.edit -
render-md.jsdidn't have to change at all to move the render step client side! -
installing
hyperwatchto get serverside message feedback in the browser -
initializing hyperwatch client side (
main.jslines: 5) and server side (index.jslines: 46) -
removed test code from
render-md.js
- installed local
browserify - added a
build.jsscript that can be run vianode buildto see resulting bundle piped tostdout - interesting to note that
.bundle()returns a stream - serving bundle now by calling
buildand piping the resulting stream into the responseindex.jslines: 33-=35 - added
textareainindex.htmlfor next step
- added
css/index.csswhich contains styling for the generated markdown - added a route for it in
index.jsto serve it viacreateReadStreamlines: 37-40
- updated readme
- installed
peacockandmarkedand addedrender-md.jswhich takes a markdown string and returns rendered html - inserted a
{MARKDOWN}placeholder inindex.html - updated the server (
index.js) to render ourREADME.mdand replace{MARKDOWN}with the resulting html before serving ourindex.htmllines: 13-30 - we now launch our app via:
node index.js
- created simple http server (
index.js) that servesindex.htmlandbundle.js - interesting to note that both are piped from
createReadStreamlines: 7-15
Good place to start following the steps
- removed scripts from package.json
- index.html file that references bundle.js that needs to get genereated from main.js via:
browserify main.js > bundle.js
-cleaned up package.json
- ran nstart script to generate repo