DEV Community

Alex Romanova
Alex Romanova

Posted on

SSGNode

Git repository
Watch it work
You can specify a file/folder to generate into valid html pages. They will appear in ./dist*. You can also change the styles.css to fit your preferences, it will get copied over to ./dist and will be applied to all webpages there.
It also recognizes the first paragraph as a title.

How to use

You should have a .txt file or a folder of such files, or instead "Sherlock Holmes Selected Stories" folder with txt contents present for testing this tool.

Make sure to have node.js installed on your system.
Then, in the repository run

npm install

If you ever get an error of a missing node module, you can always look at its name (it will have a message Error: Cannot find module module) and run

npm install module

Run in your console

node index.js


Arguments

You can specify additional options through arguments like so:

node index.js -argument --argument input

To get quick instructions on the arguments do:
-h or --help

To check the version of the app:
-v or --version

To change the default directory from where the files would be read or the specific file:
-i or --input

Example of usage:

node index.js -i cats

Please note you shouldn't add ./ in the beginning, since the app will do it for you

If you wish so, you also can:
-hi or --hello

Experience

So this post is very technical. I wanted to tell about my experience doing it. Cause.. I think it's important. At first I was panicking a lot. The problem was that I didn't know the how. I didn't know the steps. I didn't know where to look. But really - I did. I just thought it was too much. So I wrote down a checklist and went one by one. The more progress I made - the easier it became.
Organizing my code was the important step I needed to actually put in the very end. It was constantly on my mind - I was making my code confusing, but I didn't know how to put it nicely since I couldn't see the whole picture. Well, you can't really see that picture if you don't have its pieces in front of you.
This whole class so far has been very overwhelming. There are videos, readings, concepts, releases, blog posts, issues, collabs, reviews... like wtf. I'll be honest - I didn't touch the readings. Too much. This release has been a ride. Still is. I am having a lot of issues literally, and I don't know if I'll fix all of them by the deadline. Maybe that's okay. What I fear though is that it will only get harder from here...

Top comments (0)