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-sylius-rest

v0.5.1

Published

Gatsby plugin for Sylius e-commerce framework

Downloads

270

Readme

CI

Description

gatsby-source-sylius-rest helps you source the data from Sylius e-Commerce framework. It sources all necessary data and creates localized pages for you.

Learning Resources

This source plugin uses API provided by SyliusShopApi bundle.

Documentation

Please check full docs here.

How to install

Using yarn:

yarn add gatsby-source-sylius-rest

or npm:

npm install --save gatsby-source-sylius-rest

Examples of usage

Add plugin configuration to your gatsby-config.js:

module.exports = {
  plugins: [
    // plugins
    {
      resolve: 'gatsby-source-sylius-rest',
      options: {
        locales: ['en', 'de'],
        url: 'https://your-sylius-shop.com/shop-api',
        pages: [
          {
            component: require.resolve('./src/templates/SyliusTaxonPage.tsx'),
            type: 'taxon',
          },
          {
            component: require.resolve('./src/templates/SyliusProductPage.tsx'),
            type: 'product',
            path: {
              de: '/:locale/produkt/:slug',
              en: '/:locale/product/:slug',
            },
          },
        ],
        schemas: {
          product: {
            variantSelectionMethod: 'String!',
          },
        },
      },
    },
  ],
};

Options

Plugin options

Please check SyliusSourcePluginOptionsInterface definition for TypeScript interface.

| Name | Required | Type | Description | |:-------:|:--------:|:----------------------------------:|--------------------------------------------------------------------------------------------------------------------------------------------------| | debug | no | boolean | Provides additional messages during Gatsby build | | limits | no | SyliusSourcePluginLimits | Rows limits used for pagination for specific calls to Sylius Shop API. | | locales | yes | string[] | List of supported locales. They are required for retrieving data from Sylius API, sourcing GraphQL nodes and link building. | | pages | no | SyliusSourcePluginPageDefinition[] | Definitions of pages which should be created using Gatsby Node API (createPages). If empty, gatsby-source-sylius-rest will not create pages. | | schemas | no | SyliusSourcePluginSchemas | Definitions of additional or overriden fields in schemas that will be sourced. | | url | yes | string | URL to the Sylius shop API. |

How to run tests

Write yarn run test in terminal or use launch configurations in your Visual Studio Code.

TODO

  1. Source products attributes.
  2. Source product variant images.
  3. Source latest products.