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

gatsby-source-gooten

v1.1.12

Published

a gatsby source plugin to get data from gooten.com

Downloads

92

Readme

Gatsby-Source-Gooten

NPM Package Github source

Purpose: Source plugin to pull data out from www.gooten.com Stage: Barebones - first plugin I've made - would love feedback, suggestions and help.

Current Progress

Currently plugin will provide the following data to gatsbys graphQL data

  • All Currencies Supported by Gooten
  • Show all ISO 2 digit CountryCodes
  • Get all Products ( filtered by your region's availability )
    • each products variants in your selected currencies cost pricing
    • each product templates ( describes to your UI how to generate a realistic product preview )

Install

npm install --save gatsby-source-filesystem

How to use

// In your gatsby-config.js
module.exports = {
  const result = require("dotenv").config({
    path: `.env.${process.env.NODE_ENV}`,
  })
  plugins: [
    {
      resolve: 'gatsby-source-gooten',
      options: {
        // recipeId is required - once you've a gooten account and logined in you can get from https://www.gooten.com/admin#/settings/api  
        recipeId: process.env.GOOTEN_RECIPEID,
        /*
          countryCode, - optional - defaults to "US"
            NOTE: a list of countryCodes (ISO 3166-1 alpha-2) are injected into data model for you to pick one.
        */
        countryCode: process.env.GOOTEN_COUNTRYCODE,
        /*
          currencyCode - optional - defaults to "USD"
            NOTE: a list of supported currencies are injected into data model for you to pick one.
        */
        currencyCode: process.env.GOOTEN_CURRENCY
      }
    }
  ]
}

Further Detail

would love to provide a full tutorial to integrate into a site, with a shopping cart provider (maybe with snipcart or stripe checkout ) I will endeavour to make one when I can however feel free to beat me too it and I'll promote it here.

Notes & Seeking Advise

I suspect it would be prudent to avoid accessing cost pricing on a page or component level as could be accessed by user in page source. instead we will need to come up with a best practise. likely this will need to be one of the following

  • a serverless function which only publishes your own pricing (for example netlify functions)
  • a config file which has your own pricing which we could override pricing in data model to make safe to access in UI

Stay tuned