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

@shopgate-ps/cli-tools

v1.0.10

Published

Shopgate Professional Services CLI tools

Downloads

20

Readme

Shopgate Professional Services - Cli Tools

Description

This npm package offers CLI tools which helps creating different pieces of code during the development of Shopgate Connect extensions.

Quick start / Installation

Installation

It is recommended to install it globally. Please install it using the following command.

npm i -g @shopgate-ps/cli-tools

Quick start

In order to execute CLI tools simply type sps in your terminal. Typing the sps command by its own lists all possible commands with their respective description. If any command needs additional params, you'll be asked during the execution.

When calling commands, the terminal's CWD must be your extension root folder, containing the extension's config file (extension-config.json), e.g.:

cd ~/myDev/extensions/MyExtension

Before every command execution it checks if there is a frontend or backend folder accessible. If not it aborts with an error message.

Danger zone

This tool changes your files and directories. Make sure to only run it when your repository is in a clean state. Please make sure to always commit or stash your changes before using it, so in case of ungraceful failure you're able to reset to the previous state without any issue.

Even though not likely, this tool might break your system. Use is at your own risk.

Frontend Commands

sps add component

Creates a component inside of the nearest components folder. If this folder doesn't exist, it creates one.

Options

  • Component name - Please use pascal case names, e.g. "MyComponent"
  • Class or function? - Choose between class or functional component.
  • With styles? - Choose if styles should be auto-generated.
  • With connector? - Choose if a connector should be auto-generated.

sps add route

Creates a new route consisting of a Route and a Page component. Adds a PATTERN constant. Makes sure it's all configured in the extension-config.json file.

Options

  • Route/Page name - The name "Stars" results in StarsRoute, StarsPage and STARS_PATTERN
  • Route pattern - The route's path pattern, e.g. `/stars'

sps add language (alias: add locale)

Adds a new language from an existing template (en-US or first found).

Options

  • Language code: e.g. pl-PL (iso format)

sps add subscriptions (alias: add subscription)

Creates subscription files. It fails if the file already exists.

sps add redux entity (alias: add redux)

Creates a redux entity: reducer, selectors, actions.

sps add portal

Creates a portal position file and a respective extension-config.json entry.

Options

  • name: portal name, e.x. page.content.after will create PageContentAfter file in the portals frontend folder and respective extension-config.json entry.

Backend commands

sps add hook

Creates a new hook step.

sps add pipeline

Creates a new empty pipeline pointing to a single step file.

Interactive commands

  • Type in console spsi
  • Choose area for sub-commands
  • Choose command to execute

About Shopgate

Shopgate is the leading mobile commerce platform.

Shopgate offers everything online retailers need to be successful in mobile. Our leading software-as-a-service (SaaS) enables online stores to easily create, maintain and optimize native apps and mobile websites for the iPhone, iPad, Android smartphones and tablets.

License

Shopgate Professional Services - Cli Tools is available under the Apache License, Version 2.0.

See the LICENSE file for more information.