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

melodrama

v1.2.4

Published

Create a new spectacular presentation without any drama!

Downloads

10

Readme

Melodrama

Build Status Coverage Status npm

Create boilerplates for presentation in a jiffy, with almost no configuration. Think of create-react-app for presentations!

Why?

FormidableLabs created an awesome library called Spectacle to create presentations with React. But as with any React app there is some overhead with configuration of a transpiler etc.

There is a Spectacle Boilerplate but you have to clone the repo, remove the .git folder and so on. Too much drama!

Melodrama is for when you're feeling lazy and just want to create a presentation for your next meetup or conference talk. Below you'll find some benefits of using Melodrama.

Features

  • Bootstrap project directory (package.json, README, ...)
  • Install required dependencies
  • Install scripts that run a dev server for you
  • Optionally install a Spectacle theme
  • Optionally install syntax highlighting
  • Uses yarn in favor of npm if installed
  • Loading spinners while everything is downloaded from the npm registry!

Getting Started

Install

Install Melodrama globally:

npm install -g melodrama

Create a presentation

To create a new presentation, run:

melodrama my-spectacle-presentation

This will created a directory called my-spectacle-presentation inside the current directory. The bootstrapping process will generate the following folder structure:

my-spectacle-presentation/
  node_modules/
  .gitignore
  index.js
  package.json
  README.md

While bootstrapping, Melodrama will ask you:

  • Whether you want to use a theme (fetched from the npm registry)
  • Whether you want to use syntax highlighting

Depending on you answers PrismJS and/or the chosen theme will be installed besided other required dependencies.

Once the installation is done, you can run the following scripts:

npm start

Compile the presentation and start a development server in watch mode. Your default browser should open automatically after the first successful compile.

Open index.js to develop you presentation!

npm run build

When you're done with your presentation run the build command and Melodrama will output a minified, bundled presentation for you.

What compiles?

Under the hood runs a webpack-dev-server that will load:

  • JS(X) with Babel using react, es2015 and stage-0preset.
  • Markdown with html-loader and markdown-loader
  • CSS with css-loader and style-loader
  • JSON with json-loader
  • Images/Fonts with file-loader

This means that any resource you import/require will automatically be included into your presentation.

Loading code examples from a file

Spectacle allows you to easily display code via the <CodePane> component. If you want to load your example code directly from a file you can do this by telling webpack to load it with the raw-loader. For example:

<CodePane
  lang="js"
  source={require('raw!./example.js')}
></CodePane>

Where is my index.html?

Melodrama will ensure that your presentation is correctly rendered. You shouldn't have to edit anything.

Reporting issues

tl;dr; Please report any issue occuring during developing here!

Melodrama is split into two seperate repositories/packages. This one and a repo containing all scripts. The benefit of having all the "development scripts" inside another npm package is that you do not have to update Melodrama. Instead, every time you bootstrap a new presentation, the latest melodrama-scripts will be downloaded for you.

So, please report any issue that occurs during development here!

Develop

  • Test: npm test (optional: -- --watch)
  • Coverage: npm run report
  • Example run: npm run dev:init