|
|
@ -1,12 +1,18 @@ |
|
|
|
#!/usr/bin/env node
|
|
|
|
// Usage: node parse.js
|
|
|
|
//
|
|
|
|
// Script that creates index.html out of web/template.html and README.md.
|
|
|
|
// It is written in JS because this code used to be executed on the client side.
|
|
|
|
// To install dependencies run:
|
|
|
|
// $ npm install -g jsdom jquery showdown highlightjs
|
|
|
|
// If running on Mac and modules can't be found after installation add:
|
|
|
|
// To install the Node.js and npm run:
|
|
|
|
// $ sudo apt install nodejs npm # On macOS use `brew install ...` instead.
|
|
|
|
// To install dependencies globally, run:
|
|
|
|
// $ npm install -g jsdom jquery showdown highlightjs@9.12.0
|
|
|
|
// If running on macOS and modules can't be found after installation add:
|
|
|
|
// export NODE_PATH=/usr/local/lib/node_modules
|
|
|
|
// to the ~/.bash_profile or ~/.bashrc file and run '$ bash'.
|
|
|
|
// To avoid problems with permissions and path variables, install modules
|
|
|
|
// into project's directory using:
|
|
|
|
// $ npm install jsdom jquery showdown highlightjs@9.12.0
|
|
|
|
|
|
|
|
|
|
|
|
const fs = require('fs'); |
|
|
|