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

rehace-github-magnolia

v0.2.0

Published

ReHaCe - Github repository components as magnolia light module.

Downloads

3

Readme

ReHaCe - Github repository components as magnolia light module.

Build status

React - Habitat - Cerebral === ReHaCe

  • Create Magnolia pages enriched with data from your favorite Github repositories.
  • Use React components from server side rendered templates.
  • Connect your components to a single state.
  • Let your authors choose which React components to show on the page.
  • Turn any React component into a Magnolia component.

Whats inside?

If youre creating a React App, the default way is to create a root component and render the whole app in the page. This is great for single page apps, as you have the full controll in your components.

As an author you use a CMS to have a nice ui/ux to manage your sites and content. In this case it is the Magnolia CMS with his nice page editing and light modules.

Our goal was it to get this two worlds together. So you add a Magnolia component to a page and add options through the dialog. In the template the react component get this options and render. All react components on the page share the same state and can respond on changes.

In this demo we connect to the Github API to fetch some repository data. The basic flow is:

  • Create a project page in Magnolia with owner and repository name.
  • The page template instantiates the React component:
<div data-component="GithubProjectRegistration"
     data-prop-owner="${content.owner!}"
     data-prop-repo="${content.repo!}">
</div>
  • The component triggers the signal projectRegistered.
  • The signal fetches the repository data from github and stores the result in the state.
const projectRegistered = [
  createProjectEntry, {
    created: [
      fetchRepoData, {
        success: [
          saveRepoData,
          setProjectAsSelectedIfFirst
        ],
        error: [logError('Could not fecth repo data.')]
      }
    ],
    exists: [noop],
    error: [logError('Could not register project')]
  }
]
  • The state now contains the repository data.
  • Any component on the page can connect to the state and render the data.

Features

ReHaCe github magnolia project list

rehace-github-magnolia-project-page

Project list with the cerebral debugger

rehace-github-magnolia-project-page

Magnolia author, create the project list

rehace-github-magnolia-project-page

Demo

To see a page demonstrating this components, open the Pages app in Magnolia AdminCentral and import the file _dev/demos/website.rehace-projects.xml (Import it directly at the root of the tree to see an example of the included css styling.)

Development

npm run

npm run start
  • clean
  • Watch all files in _dev for changes.
  • Saves build bundles in webresources
  • Start a livereload server on default port 35729
npm run build
  • clean
  • Builds a bundle from _dev.
  • Saves build bundles in webreources
npm run clean
  • Deletes webresources

Information on Magnolia CMS

This directory is a Magnolia 'light module'. https://docs.magnolia-cms.com

License

MIT

Contributors

  • Peter Höffling
  • Jan Rösler

Join us on