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

@fa-repo/mobile-dev-environment

v0.7.1

Published

MDE displays a console output tray and extendable action bar inside your browser window.

Downloads

11

Readme

Mobile Dev Environment

MDE displays a console output tray and extendable action bar inside your browser window.

version MIT License

Markdown Dev Environment example

Table of Contents

Features

  • Actions bar: is a configurable menu containing quick access buttons (called actions).
  • Bundled actions: include reloading / cache busting the page and toggling the console tray.
  • Console tray: catches and displays console.log(), console.error(), console.assert() output.
  • Runtime errors: are caught and shown in the console tray.

Install

With node:

npm install @fa-repo/mobile-dev-environment

With unpkg.com:

<script src="https://unpkg.com/@fa-repo/mobile-dev-environment@latest/dist/mde.min.js"></script>
<link href="https://unpkg.com/@fa-repo/mobile-dev-environment@latest/dist/mde.min.css" rel="stylesheet" type="text/css">

Node usage

// app.js
import mobileDevEnvironment from '@fa-repo/mobile-dev-environment';
import '@fa-repo/mobile-dev-environment/mobile-dev-environment.css';

window.addEventListener("DOMContentLoaded", event => {
  new mobileDevEnvironment({
    root: document.getElementById('mde'),
    stateId : 'my-multi-page-app',
    actionsCorner : 'tl'
  });
});

// app.html
<!-- ... -->
<html>
  <head>
    <link href="./link/to/app.min.css" rel="stylesheet" type="text/css" />
    <script src="./link/to/app.min.js" defer></script>
  </head>
  <body>
    <div id="mde"></div>
  </body>
</html>

Browser usage

<!DOCTYPE html>
<html lang="en">
  <head>
  <link href="https://unpkg.com/@fa-repo/mobile-dev-environment@latest/dist/mde.min.css" rel="stylesheet" type="text/css">
  <script src="https://unpkg.com/@fa-repo/mobile-dev-environment@latest/dist/mde.min.js" defer></script>
</head>
<body>
  <div id="mde"></div>
  <script>
    new mobileDevEnvironment({
      root: document.getElementById('mde'),
      stateId : 'my-multi-page-app',
      actionsCorner : 'tl'
    });
  </script>
</body>
</html>

Configuration

Actions

Actions are easily accessible buttons that appear in the actions bar. You can either use the buttons that come packaged with MDE or make your own.

Packaged actions

Packaged actions can be referenced in two ways. Either as strings by name or as objects which enable configuration.

// Example A
[ "reload", "toggle-tray" ]
// Example B
[ { action: "reload", refreshCache: false }, "toggle-tray" ]
// Example C
[ { action: "reload", refreshCache: false }, { action: "toggle-tray"} ]

Packaged action - reload: this action reloads the page.

Packaged action - toggle-tray: this action toggles the console tray.

Custom actions

Custom actions are a way to extend MDE with your own buttons. The API is quite flexible but at a minimum all custom actions require an action key with a value of "custom".

// Example
[
    { action: "custom", content: "Click me", onClick: e => alert("Hi!") }
]