https://github.com/frontend-layers/mobile-friendly-test
Node.js library for test site by Mobile Friendly Test API and output errors in the console with Gulp.js compatibilities
https://github.com/frontend-layers/mobile-friendly-test
gulp mobile-friendly nodejs testing
Last synced: 2 months ago
JSON representation
Node.js library for test site by Mobile Friendly Test API and output errors in the console with Gulp.js compatibilities
- Host: GitHub
- URL: https://github.com/frontend-layers/mobile-friendly-test
- Owner: Frontend-Layers
- License: mit
- Created: 2022-09-09T13:19:18.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-09-09T18:56:44.000Z (almost 4 years ago)
- Last Synced: 2026-01-01T16:33:53.900Z (6 months ago)
- Topics: gulp, mobile-friendly, nodejs, testing
- Language: JavaScript
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Mobile Friendly Test
_Node.js library for testing HTML files on the fly and output errors in the console with Gulp.js compatibilities_
[](https://github.com/andreymatin/mobile-friendly-test/LICENSE)
[](https://www.npmjs.com/package/mobile-friendly-test-npm)
## How to install
### API key
Before start you need to generate Google API key and add Google Search Console API into your Google APIs dashboard.
https://developers.google.com/webmaster-tools/search-console-api/v1/configure
### npm
```shell
npm i mobile-friendly-test-npm
```
### yarn
```shell
yarn add mobile-friendly-test-npm
```
## How to use
```javascript
import mobileFriendlyTest from 'mobile-friendly-test-npm'
const apiKey = ''
const url = ''
mobileFriendlyTest(url, apiKey)
```
## Gulp.js integration
```javascript
import gulp from 'gulp'
const { parallel } = gulp
import mobileFriendlyTest from 'mobile-friendly-test-npm'
const apiKey = ''
const url = ''
const mobileTestRes = () =>
mobileFriendlyTest(url, apiKey)
export default
parallel(
mobileTestRes
)
```
## Reference
- [Search Console Testing Tools API](https://developers.google.com/webmaster-tools/search-console-api/reference/rest/v1/urlTestingTools.mobileFriendlyTest)
- [Your Google API list](https://console.cloud.google.com/apis/dashboard)
---
[MIT License](LICENSE)