-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from maddevsio/gh-action
Use as actions on github
- Loading branch information
Showing
6 changed files
with
118 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: SEO analyzer | ||
|
||
on: [push] | ||
|
||
jobs: | ||
seo-analyzer: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20.x' | ||
- run: npm i -g seo-analyzer | ||
- run: seo-analyzer -h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,54 @@ | ||
#!/usr/bin/env node | ||
const { Command } = require('commander'); | ||
const ver = require('./version'); | ||
const analyzers = require('./analyzers'); | ||
const version = require('./version'); | ||
const analyzer = require('./analyzer'); | ||
|
||
const program = new Command(); | ||
|
||
program | ||
.option('-v, --version', 'Show version', ver, '') | ||
.option( | ||
'-v, --version', | ||
'Display Application Version: Displays the current version of the application.' | ||
) | ||
// IGNORES | ||
.option('-iu, --ignore-urls <ignoreUrls...>', 'Multiple ignore urls') | ||
.option('-if, --ignore-files <ignoreFiles...>', 'Multiple ignore files') | ||
.option( | ||
'-iu, --ignore-urls <ignoreUrls...>', | ||
'Exclude Specific URLs from Analysis: Excludes certain URLs from analysis to avoid processing unwanted web pages.' | ||
) | ||
.option( | ||
'-if, --ignore-files <ignoreFiles...>', | ||
'Exclude Specific Files from Analysis: Allows excluding certain files from analysis, preventing their processing.' | ||
) | ||
.option( | ||
'-ifl, --ignore-folders <ignoreFolders...>', | ||
'Multiple ignore folders' | ||
'Exclude Specific Folders from Analysis: Excludes specified folders from the analysis process, ignoring all files within those folders.' | ||
) | ||
// INPUTS | ||
.option('-u, --urls <urls...>', 'Multiple url analysis') | ||
.option('-f, --files <files...>', 'Multiple files analysis') | ||
.option('-fl, --folders <folders...>', 'Multiple folders analysis') | ||
.option( | ||
'-u, --urls <urls...>', | ||
'Perform SEO Analysis on Specified URLs: Conducts SEO analysis for specified URLs, checking their compliance with certain SEO criteria.' | ||
) | ||
.option( | ||
'-f, --files <files...>', | ||
'Perform SEO Analysis on Specified Files: Performs SEO analysis on specified files, ensuring their adherence to optimization standards and rules.' | ||
) | ||
.option( | ||
'-fl, --folders <folders...>', | ||
'Perform SEO Analysis on Specified Folders: Analyzes all files within specified folders for compliance with SEO rules and recommendations.' | ||
) | ||
// RULES | ||
.option('-r, --rules <rules...>', 'Multiple rules') | ||
.option( | ||
'-r, --rules <rules...>', | ||
'Apply Specific SEO Rules for Analysis: Applies specific SEO rules during analysis, allowing the user to customize the inspection process.' | ||
) | ||
.parse(process.argv); | ||
|
||
const options = program.opts(); | ||
|
||
analyzers(options); | ||
if (!Object.keys(options).length) { | ||
program.outputHelp(); | ||
} else if (options.version) { | ||
version(); | ||
} else { | ||
analyzer(options); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters