A simple command-line tool to check if a website uses JavaScript rendering.
This CLI tool uses Puppeteer to load a website, capture its content before and after disabling JavaScript, and then compares the content to determine if the website relies on JavaScript rendering.
-
Clone this repository to your local machine:
git clone https://github.com/your-username/website-js-rendering-checker-cli.git cd website-js-rendering-checker-cli
-
Install dependencies:
npm install puppeteer commander
Run the CLI tool with the -u or --url option followed by the URL of the website you want to check.
./cli.js -u https://www.example.com
- -u, --url : This option allows the user to specify the URL of the website they want to check. The -u is the short form, and --url is the long form of the option. The part indicates that the user should replace it with an actual URL.
- Example usage with the short form:
./cli.js -u https://www.example.com
- Example usage with the long form:
./cli.js --url https://www.example.com
The (required) annotation in the README indicates that providing a value for this option is mandatory when running the command. Users must specify a URL for the tool to work properly.
- Other options: Depending on the functionality you want to provide in your tool, you can add more options similarly. For example, you might consider adding options like:
-t, --timeout : Specify the timeout for page loading (in milliseconds). -h, --help: Show help information about how to use the tool. -v, --version: Show the version of your tool.
./cli.js -u https://www.example.com
- Puppeteer : Headless Chrome Node.js API to interact with the website.
This project is licensed under the MIT License.