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

shopify-mock-products

v1.0.0

Published

This Node.js application generates a CSV file with mock product data for Shopify stores. It allows you to create a specified number of products within a given category and includes product images fetched from the Pexels API.

Downloads

4

Readme

Shopify Mock Products Generator

This Node.js application generates a CSV file with mock product data for Shopify stores. It allows you to create a specified number of products within a given category and includes product images fetched from the Pexels API.

Features

  • Generates mock product data based on a specified category
  • Includes product images from the Pexels API
  • Exports data to a Shopify-compatible CSV file

Prerequisites

  • Node.js (version 14 or later recommended)
  • NPM (Node Package Manager)
  • Pexels API key

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/shopify-mock-products.git
  1. Change the current directory to the project folder:
cd shopify-mock-products
  1. Install the required dependencies:
npm install
  1. Set up the environment variables: Create a .env file in the project's root directory and add your Pexels API key:
PEXELS_API_KEY=your_pexels_api_key_here

Replace your_pexels_api_key_here with your actual Pexels API key.

Usage

To generate mock products, run the following command:

node app.js "Category" NumberOfProducts

Replace Category with the desired product category (e.g., "Electronics") and NumberOfProducts with the number of products you want to generate (e.g., 10).

Example:

node app.js "Electronics" 10

This command will generate a CSV file named shopify_products.csv containing 10 mock electronic products.

NOTE / TODO

  • The amount argument is a maximum, but you will most likely get less, because ones w/o images are discarded
  • Main improvement would be to have higher quality images, currently using Pexels, but considering other options including adding better keywords for filtering
  • You can request any amount you want; however, over 100 at once, there may be errors

Contributing

Contributions are welcome! If you'd like to contribute, please create a fork of this repository, make your changes, and submit a pull request. If you have any questions or need assistance, feel free to open an issue.

License

This project is licensed under the MIT License. For more information, see the LICENSE file.