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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@menucloud/mc-menu-widget

v0.0.62

Published

## How to install:

Readme

mc-menu-widget

How to install:

Using npm

This is the recommended way. To install, just do this:

npm i --save @menucloud/mc-menu-widget

Out of the box, what can I do?

Just add the dependency here and usage here:

<script src="node_modules/@menucloud/mc-menu-widget/dist/mc-menu-widget.js"></script>

<mc-menu-widget
  secret="secret-key"
  key="api-key"></mc-menu-widget>

The parameters:

  • secret: secret key
  • key: api key

Todo: Because this is a test, It needs to define more parameters (like booking-type or menu-id).

How to build (for developing)

Out of the box, what do I see

- demo - for manual testing and demo purposes
  - index.html - a demo on how to use the file
  - published.json - created using the command `npm run create-simulation`. This simulates the JSON response of the menucloud API
- dist - distribution purposes when installed on npm
  - vendor - this is for demo purposes only, polyfills folder to make it work on IE11, Safari 9, and 10, Edge and Firefox
  - mc-menu-widget.html - when you want to use `<link rel="import">`
  - mc-menu-widget.js - the bundled version
- simulation - folder that houses the necessary templates and styles to be transformed into the published.json.
  - components - houses all component templates that can be modified
  - data - houses the data component of the simulated json
    - menu.json - mimics a collection of menus to be loaded to the menu widget
  - style - houses all styles in (currently) scss format
    - components - all component styles that can be modifed
    - menu.scss - example definition the global default style of all menus
    - child-theme.scss - example definition of a child theme
    - theme.json - links menu.scss and child-theme.scss to the global theme and a specifc menu theme respectively.
  - index.js - simulation compiler. Run when `npm run create-simulation` is called
- src - contains all code for the widget to work
  - components - all component logic
  - mixins - contains reusable methods as extensions for the components
    - mc-menu - contains the methods for getting and updating the mc-menu-widget state
  - styles - contains the default style of the mc-menu-widget
  - utils - extra libraries the needed by the widget
- mc-menu-widget.js - main source file
- webpack.config.js - bundler

Install dependencies...

npm i

Once the dependencies have be installed, You need to run 3 terminals (for now) to bundle/watch, serve it on localhost, and update the published.json.

1st terminal would bundle/watch the project

npm run watch

2nd terminal would run the http-server on root project

http-server .

And then you can go to localhost:8080/demo to see a working widget

If you made changes inside the simulation folder, you need to run

npm run create-simulation

Menu widget Attributes

  • no-fixed-price - Boolean, if set to true, the fixed price won't show up
  • key - String, is the key assigned to the client
  • secret - String, the secret string to access the server
  • business-id - String, client business id
  • published-id - String, the id of the published menus
  • menus - Array, an array of menus ids that will show up inside the widget
  • dev - Boolean, if true the widget will fetch data from the dev server
  • local - Boolean, if true, the widget will fetch data from the local server
  • test - Boolean, if true the widget will use the simulation files
  • menuid - String, the id of the menu that needs to be printed
  • print - Boolean, if true, it will fetch the menu specified in the menuid attribute in order to print it
  • print-local - Boolean, if true will fetch the menu specified in the menuid attribute in order to print it from the local server

Todo

  • Use some form of watching mechanism to change published.json when there are changes in simulation folder
    • can use gulp but don't use flatten the node_modules.
  • If it is possible, transform this to using rollup instead of webpack