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

swapi-integration

v1.0.1

Published

## Creating a new integration? The fastest way to get started is to use our CLI to generate a new integration boilerplate

Downloads

4

Readme

SDK Based Integration Boilerplate for Alokai

Creating a new integration?

The fastest way to get started is to use our CLI to generate a new integration boilerplate

 npx @vue-storefront/cli create integration

The CLI will ask you a few questions and generate a new integration boilerplate based on your answers.

For more information about creating a custom integration using the Alokai SDK, please visit the documentation.

From the project root, you can run the one of following commands, depending on your package manager:

yarn dev

or

npm run dev 

This will do the following:

  • start the development server for the playground/app application.
  • start the middleware server for the playground/middleware application.

Adding an endpoint

npx @vue-storefront/cli  add endpoint getSomething

This will do the following:

  • add a new endpoint to the api-client package
  • add a new method to the sdk package
  • add a new route to the playground/middleware application
  • add a new route to the playground/app application

Using vs Contributing

Using the CLI is the recommended way to create a new integration boilerplate. However, if you're planning to contribute, you can follow the steps below.


Would you like to contribute?

This is an open-source project. Feel free to contribute by creating a new issue or submitting a pull request. We highly recommend opening an issue and getting feedback before submitting a pull request, to avoid unnecessary work.

If we feel your contribution would benefit the community, and it adheres to our standards, we would be delighted to accept your pull requests.

For internal use only. All changes are recorded in the CHANGELOG.md file.

This is a new integration boilerplate for Alokai integrations based on the SDK.

Requirements:

  • NodeJS v16 or later,
  • Yarn.

Consuming Project Requirements

If you would like to use an interation based on this boilerplate in a project, the project must meet these requirements.

Minimum Versions

  • "@vue-storefront/middleware": "^@3.9.0"
  • "@vue-storefront/sdk": "@1.4.0"
  • "@vue-storefront/next": "@1.1.0" || "@vue-storefront/nuxt": "3.1.0"

You may need to add resolutions for @vue-storefront/sdk in frontend package.json if your project requires different sdk versions in addition to the version required here.

If your project needs to be upgraded you can check out the Migration Guide

Repository structure

This repository contains a few necessary packages to help you get started building your new integration:

  • playground/app - (created during CLI initialization) Demonstrates the usage of api-client by creating an express server app. You can use this directory to demonstrate the usage of the integration.
  • playground/middleware - An express app that uses the api-client to create a server-to-server connection with service providers (e.g. commerce backend).
  • packages/api-client - The service the middleware uses. It contains an exampleEndpoint that can be used as an example for the other API endpoints,
  • packages/sdk- Think of the SDK Connector as a communication layer between the storefront and the middleware. It contains an exampleMethod with example documentation, unit & integration tests, that can be used as an example for the rest SDK connector methods.
  • docs - VuePress documentation with configured API extractor, to create an API Reference based on the api-client and sdk methods & interfaces.

Getting started

yarn
  1. Build the packages,
yarn build
  1. Test the packages,
yarn test
  1. That's it. Now you can start the developing your contribution,
  2. Enjoy.