npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

nceco-cli

v1.1.0

Published

CLI tool for web ecoconception analysis based on GreenIT best practices. Validates W3C compliance, cache headers, and other performance optimizations.

Readme

Eco-CLI

Un outil CLI pour l'analyse d'écoconception web basé sur les bonnes pratiques GreenIT.

🚀 Installation

npm install -g nceco-cli

📖 Utilisation

Analyse d'une URL simple

eco https://example.com

Analyse avec configuration

eco --config eco-config.json

Exemple de fichier de configuration

{
  "urls": [
    "https://example.com",
    "https://example.org"
  ],
  "options": {
    "ignoreViteHashedFiles": true,
    "skipW3cValidation": false,
    "w3cValidation": {
      "tolerant": true,
      "maxErrors": 5
    },
    "cacheHeaders": {
      "ignorePatterns": [
        "\\.(js|css|png|jpg|jpeg|gif|svg|woff|woff2|ttf|eot)$"
      ]
    }
  }
}

🔧 Tests disponibles

Tests Automatisables

  • RWEB_0009 - Limiter le nombre de requêtes HTTP
  • RWEB_0101 - Ajouter des en-têtes Expires ou Cache-Control
  • RWEB_0077 - Minifier les fichiers CSS et JavaScript
  • RWEB_0099 - Utiliser un cache HTTP
  • RWEB_0010 - Stocker les données statiques localement
  • RWEB_0011 - Avoir un titre de page et une metadescription pertinents
  • RWEB_0019 - Remplacer les boutons officiels de partage des réseaux sociaux
  • RWEB_0027 - Fournir une CSS print
  • RWEB_0029 - Favoriser les polices standards
  • RWEB_0031 - Valider les pages auprès du W3C
  • RWEB_0032 - Externaliser les CSS et JavaScript
  • RWEB_0034 - Dimensionner correctement les images côté navigateur
  • RWEB_0037 - Utiliser le chargement paresseux
  • RWEB_0078 - Compresser les fichiers texte
  • RWEB_0079 - Combiner les fichiers CSS et JavaScript
  • RWEB_0080 - Optimiser les images
  • RWEB_0082 - Optimiser la taille des cookies
  • RWEB_0095 - Éviter les redirections
  • RWEB_0107 - Compresser les documents
  • RWEB_4006 - Privilégier HTTP/2 à HTTP/1
  • RWEB_4007 - Économiser la bande passante grâce aux service workers
  • RWEB_4008 - Mettre en place un sitemap efficient

⚙️ Configuration

Options W3C Validation

{
  "w3cValidation": {
    "tolerant": true,     // Mode tolérant activé
    "maxErrors": 5        // Maximum 5 erreurs acceptées
  }
}

Options Cache Headers

{
  "ignoreViteHashedFiles": true,  // Ignorer les fichiers Vite avec hash
  "cacheHeaders": {
    "ignorePatterns": [
      "\\.(js|css|png|jpg|jpeg|gif|svg|woff|woff2|ttf|eot)$"
    ]
  }
}

🆕 Nouveautés v1.1.0

  • Validation W3C améliorée : Validation directe du HTML pour URLs locales et publiques
  • Support Vite : Détection automatique des fichiers avec hash
  • Mode tolérant : Configuration flexible pour les erreurs W3C
  • Meilleure gestion des erreurs : Détails plus précis et robustesse améliorée
  • Configuration étendue : Plus d'options de personnalisation

🔍 Exemple de sortie

Analyzing https://example.com..

--- Eco-Conception Analysis Report ---
[PASS] Limiter le nombre de requêtes HTTP: Le nombre de requêtes HTTP (15) doit être inférieur ou égal à 40.
[PASS] Ajouter des en-têtes Expires ou Cache-Control: Le nombre de ressources sans en-tête de cache (0) doit être inférieur ou égal à 0.
[PASS] Valider les pages auprès du W3C: The page is valid according to the W3C validator (HTML content validation).
[PASS] External CSS and JavaScript: All CSS and JavaScript are externalized.
[PASS] Cookie Size: No cookies are being set.
[PASS] HTTP/2: The page is served over HTTP/2.
--------------------------------------

🤝 Contribution

Les contributions sont les bienvenues ! N'hésitez pas à :

  1. Fork le projet
  2. Créer une branche pour votre fonctionnalité
  3. Commiter vos changements
  4. Pousser vers la branche
  5. Ouvrir une Pull Request

📄 Licence

MIT License - voir le fichier LICENSE pour plus de détails.

🙏 Remerciements

Basé sur les bonnes pratiques GreenIT pour l'écoconception web.