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 🙏

© 2024 – Pkg Stats / Ryan Hefner

fractal-tenon

v1.0.0

Published

Fractal component library tool (http://fractal.build) plugin for accessibility testing against Tenon (http://tenon.io)

Downloads

6

Readme

fractal-tenon NPM version NPM downloads Dependency Status Development Dependency Status

is a Fractal add-on that let's you test your components against Tenon for accessibility issues.

Installation

To add Tenon support to your Fractal instance, run

npm install fractal-tenon --save

Configuration

To add the Tenon tab to your component view and enable accessibility testing, you need to add some lines to your fractal.js project configuration:

'use strict';

const fractal = module.exports = require('@frctl/fractal').create();

/* Regular project configuration here ... */

// Require the Fractal theme and Tenon add-on libraries
const mandelbrot = require('@frctl/mandelbrot');
const tenon = require('fractal-tenon');

// Explicitly create a theme instance
const theme = mandelbrot(/* {...} */);

// Configure Tenon support
tenon(theme, {
    apiKey: '<TENON_API_KEY>',
    publicUrl: 'http://fractal.example.com'
});

// Let Fractal use the configured theme
fractal.web.theme(theme);

You need to provide two parameters to configure Tenon support:

  1. Tenon API Key: You will find this one under the "API Key" section on your tenon.io dashboard (account required).
  2. Public URL: Your Fractal instance needs to be publicly available for Tenon to fetch and test your components. Provide the fully qualified URL (including scheme and port if necessary).

If configured correctly, Fractal should show you a new panel labelled "Tenon" in your component view.

Tenon panel in Fractal

You may control its position by explicitly configuring the panels option of your Fractal theme (e.g. Mandelbrot):

const theme = mandelbrot({
    panels: ['html', 'view', 'tenon', 'info']
});

Hitting the "Test with Tenon" button will call Tenon and display a short version the issues found for your component. You may view the full test results on tenon.io;

Important Note

Please be aware that, due to the nature of the Tenon API, you should never make your Tenon connected Fractal instance available to the public. Tenon requires your private API key to be sent with every request, so you basically expose your secret key to anyone having access to your Fractal instance. You have been warned!

Docker Image

We provide an experimental Dockerfile for build a Docker image running a Fractal instance with Tenon support.

Known Problems

  • The client JavaScript involved requires you to use a fairly recent browser version
  • The module is in a very early stage and might have bugs. Please let me know if you spot one!

To-Do

  • Add tests

Changelog

Please refer to the changelog for a complete release history.

Legal

Copyright © 2019 Joschi Kuphal [email protected] / @jkphl. fractal-tenon is licensed under the terms of the MIT license.