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

homeflowjs

v1.0.41

Published

JavaScript toolkit for Homeflow themes

Downloads

2,019

Readme

HomeflowJS

JavaScript/React toolkit for Homeflow themes.

This project uses Yarn to manage dependencies. Run yarn to install them.

Usage

Please see the HomeflowJS developer documentation for instructions on usage.

Local Development

To work on this package locally, use yarn link to link the theme directly to your local copy of homeflowjs (or just specify file:~/projects/homeflowjs in the theme's package.json file).

Make sure you have cache disabled in Webpack or your changes to HomeflowJS may not be updated locally. You can set this in your Webpack config in whichever theme you are using for testing:

"cache": false

Quality Assurance

To get changes made in a branch of HomeflowJS deployed to a theme feature branch, change the package.json line for HomeflowJS to:

 "homeflowjs": "git+ssh://[email protected]:homeflow_developers/homeflowjs.git#<<<branch-name-here>>>",

After the change has been made push the feature branch and wait for the branch code to be compiled.

Tests

Run tests:

# Run all tests
yarn test

# run tests in a specific file
yarn test search/search-form/property-search.test.js

HomeflowJS does not have react or react-dom as dependencies, only peer dependencies. This is to prevent conflicts with the version of these libraries in the theme, but it means you may see an error message when you run tests locally:

Cannot find module 'react' from 'node_modules/enzyme-adapter-react-16/build/ReactSixteenAdapter.js'

To prevent this error, you can use yarn link to create a symlink to a copy of the libraries elsewhere on your machine (like in the node_modules/ dirctory of a theme). After running yarn link in each module's location, run this in this directory:

yarn link react redux react-redux react-router-dom

When you want to run a theme locally using your local version of homeflowjs, you may need to unlink the packages using e.g. yarn unlink react (otherwise you may see an error about hooks and multiple copies of react).

$ cd ctesius/app/liquid_templates/my_theme/node_modules/react # wherever the theme is located
$ yarn link
$ cd ~/projects/homeflowjs # wherever homeflowjs is located
$ yarn link react
success Using linked package for "react".

You may need to repeat this for react-dom.

This is a known issue with peer dependencies, see this comment and containing thread for more info: https://github.com/facebook/react/issues/14257#issuecomment-439967377

Deploy

To create a new version of HomeflowJS when merging to master, keep an eye on the Jenkins build, it pauses and waits for publish confirmation where you can enter the new version number and publish.