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

dextrose

v4.0.10

Published

[![Build Status](https://app.bitrise.io/app/6dbd09bf795284e8/status.svg?token=cPPMxR4jerIruWOfSt-_6g)](https://app.bitrise.io/app/6dbd09bf795284e8)

Downloads

188

Readme

Build Status

Dextrose

Brought to you by The Times Tooling team 🛠

Dextrose is a testing library that enables the screen shots of components across all react-native platforms

This has been made possible using fructose to load components.

Overview

Implementation

Dextrose's purpose is to iterate through all the bundled components defined by showcases and take a screenshot of each.

The .showcase file is a description of how a component should be rendered. Showcase files came around because originally fructose consumed storybook files. This eventually resulted in numerous issues so we created an abstraction layer which decouples components from storybook. You can see a working example of how showcase to storybook works here.

Times-Components-storybook

react-native-showcase-loader can be used to dynamically generate a component file with all your defined components.

Features

  • Images of components across native platforms
  • Images of components at specified breakpoints across web
  • Upload component images to specified s3 Bucket
  • Html presentation of images across platforms

The CLI

Dextrose supports the following commands:

run
upload
generate-html

The Dextrose run command can be run with the following commands:

dextrose run --config, -c -path/to/config

    --config, -c -path/to/config

    --snapshotWait, -t
        Ms to wait between loading a component and taking the snap
    
    --loglevel, -l
        default is set to info, able to set level to verbose

Example config for platforms

Native

    module.exports = {
        snapPath: path.join(__dirname, '../snaps'),
        platformName: "iOS",
        ignoredShowcases: ["IGNORE"]
    }

Web

    module.exports = {
        snapPath: path.join(__dirname, '../snaps'),
        platformName: "web",
        breakpoints:[500, 1000],
        ignoredShowcases: ["IGNORE"]
    }

The Dextrose upload command can be run with the following commands to push component images to s3:

dextrose upload snapshotDir --bucket bucketname --key commit_hash

    --bucket, -b
        the name of the s3 bucket

    --key, -k
        the name of the key in the bucket

    --region, -r
        the aws region

The Dextrose generate-html command can be run with the following commands to generate component presentation:

dextrose generate-html --upload --bucket bucketname --key commit-hash

    --upload, -u
        using this will attempt to upload the html file to s3

    --bucket, -b
        the name of the s3 bucket

    --key, -k
        the name of the key in the bucket

    --region, -r
        the aws region

Running the example

To run the the example Pull the repo

  • Run yarn in the Dextrose folder
  • Run yarn in the snapshots folder (the snapshots folder is an example of how you would consume dextrose)
  • Run ./run-(ios | android | web).sh

note: please make sure you have an (emulator | simulator), and a packager running.

Future ideas

  • Comparison of images
  • Specify device orientation