Our great sponsors
mh-ssg | yargs | |
---|---|---|
13 | 38 | |
1 | 10,928 | |
- | 0.5% | |
0.0 | 5.0 | |
over 2 years ago | 24 days ago | |
JavaScript | JavaScript | |
MIT License | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
mh-ssg
Posts with mentions or reviews of mh-ssg.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2021-11-18.
-
Publishing my first package
This week, I've published my 1st package on npm - mh-ssg - a static site generator CLI.
-
Adding Continuous Integration to a Project
I also worked on another project, mh-ssg, and added tests to this project as well. I created unit tests for a function called processFolder(). This function accepts an input folder path, output folder path and stylesheet URL. I created two unit tests, one which tests when a valid input folder containing files is passed to the function and one which tests when a non-existent folder is passed to the function. The function logs a message to the console depending on how many files are saved in the output folder, so the tests I wrote tested for these console logs.
-
Add testing to SSG
For this lab, I picked Jest as the testing tool for mh-ssg. This is a popular Javascript testing framework thanks to its simplicity and ease of usage.
-
Adding Static Analysis Tools to SSG
To maintain the quality of source code, I added a formatter and a linter for my project.
-
Static Site Generator - Support static files
Throughout the previous week, I was exploring Docusaurus and found that they have a feature to support static files. I find this feature very useful for any static site generator since images, favicons, stylesheets, etc. are very common parts of a webpage. Therefore, I decided to add this feature in my tool.
-
Code Refactoring and Rebase
As new features are added to the tool, I realized that the logic is not clear anymore and some parts were duplicated, making it inefficient and hard to maintain. This time, I decided to focus on removing those duplications by moving the statements to the appropriate place and extracting function for reusability. All the refactoring was done through a single commit with the help of git rebase.
-
Working with git remote - approving new feature
Luke also implemented the same feature for my project. His code in general was good but I suggested some changes including separating modules and combining functions to remove code duplicates.
-
A different way of reviewing pull requests
After looking through my classmates' projects, I decided to work on Minh Hang's static site generator and filed an issue to her repo.
-
Merges and conflicts
In the last update, my friend - Dustin - helped to add Markdown as a valid input for my tool. Markdown syntaxes are different from HTML syntaxes and he has worked on converting some of them. This time I decided to add two more:
-
Collaboration and pull requests
I've been sending a lot of pull requests but this was actually my first time receiving one 😄 and Dustin was my first contributor. He also proposed to add Markdown support for my tool and to parse all the headings, bold, italics and link from markdown into the corresponding HTML tags. I scanned through the pull request and found some minor issues, including missing new feature in documentation and missing the handling of the output file name. We also had different opinions about the implementation of .txt file and .md file. However after discussion, we came to agreement and I approved his changes.
yargs
Posts with mentions or reviews of yargs.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2024-03-28.
-
A Guide to Building CLI Tools in JavaScript
Your tool now automates project setup, but there's room for improvement. Consider adding more features or handling user input to customize the project structure. Explore packages like yargs for parsing command-line arguments. You can learn more about yargs through their official documentation here.
-
Mastering Node.js CLI: Best Practices and Tips
This code snippet uses yargs, a Node.js package, to parse command-line arguments in a POSIX-compliant way, including support for short and long-form options. You could also use the popular commander defined as a complete node.js command-line interface.
- Show HN: Pg-CLI – Read PG's essays in your terminal
-
Process of working in parallel branches in GitHub
This feature was implemented by adding a new argument option -l or --lang in yargs as below.
-
Searching through JSON logs locally
Creating CLIs with yargs is a piece of cake. For LZ4 there is a streaming implementation on npm which is a single function and also happened to decompress my files without any errors. Everything else is out-of-box Node.js.
-
What is your ideal setup for new project for solo developers
Backend is more tricky. - RESTful APIs I prefer Koajs - For a RPC/microsevice, I have only used gRPC - For a CLI, yargs and inquirer
-
yargs VS clerc - a user suggested alternative
2 projects | 26 Dec 2022
- Making command line commands with javascript
-
DPS909 Blog - Lab 3: Managing Simultaneous Changes
To accomplish this task, I added a new option using the yargs module. This allows me to read whatever the user inputs after using -l/--l. Following this, I added a conditional statement that defaults to en-CA whenever a language code is not inputted.
-
Command line applications
You can build them from scratch, or use one of many specialized libraries on NPM, like commander, yargs, blessed, terminal kit, prompts, and many more.
What are some alternatives?
When comparing mh-ssg and yargs you can also consider the following projects:
Docusaurus - Easy to maintain open source documentation websites.
minimist - parse argument options
mini-ssg - MINI - A minimalist static site generator written in JS.
Inquirer.js - A collection of common interactive command line user interfaces.
meow - 🐈 CLI app helper
oclif - CLI for generating, building, and releasing oclif CLIs. Built by Salesforce.
vorpal - Node's framework for interactive CLIs
get-stdin - Get stdin as a string or buffer
cross-env
furious-commander - Testable and easily usable CLI framework
node-config - Node.js Application Configuration
chalk - 🖍 Terminal string styling done right