Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
homeflowjs
Advanced tools
JavaScript/React toolkit for Homeflow themes.
This project uses Yarn to manage dependencies. Run yarn
to install them.
Please see the HomeflowJS developer documentation for instructions on usage.
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
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://git@bitbucket.org: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.
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
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.
FAQs
JavaScript toolkit for Homeflow themes
The npm package homeflowjs receives a total of 493 weekly downloads. As such, homeflowjs popularity was classified as not popular.
We found that homeflowjs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.