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

@my-scrapbook/local-api

v2.0.3-alpha.0

Published

- It's a full-featured in-browser IDE and markdown editor for documentation. - You can import any npm module in the IDE. The bundling and transpiling of your code are handled in the browser. - React and ReactDOM are already imported and ready for use.

Downloads

4

Readme

Getting Started with My Scrapbook - a dynamic coding environment.

What is My Scrapbook, and what does it do?

  • It's a full-featured in-browser IDE and markdown editor for documentation.
  • You can import any npm module in the IDE. The bundling and transpiling of your code are handled in the browser.
  • React and ReactDOM are already imported and ready for use.
  • All of your text and code are automatically saved to a file named notebook.js

Install Instructions.

  • Open a folder on your terminal where you don't mind a few files being written.
  • Run the following command:
npm i my-scrapbook

To Run My Scrapbook

  • In the same folder you install My Scrapbook, open up a terminal session and run:
npx my-scrapbook serve
  • Ctrl + click on the link in the terminal that says http://localhost:4005
  • Click the + Code or +Text button at the top of the screen to get started! blank emptycells
  • All your work is saved to the file notebook.js.
  • Next time you run the application using the same command, it will open to your previous notebook.js file.
  • If you want to start a new notebook and don't care about the saved work from your previous session, delete the notebook.js file in the same directory before starting My Scrapbook again. (Or you could leave the notebook.js and click the X button on all your previous work once the IDE is loaded into the browser.)
  • If you want to keep your previous work and start a new notebook, rename or move the notebook.js file in the same directory before starting My Scrapbook again. notebook

Markdown sample text for the text editor that contains an "Explainer".

**My Scrapbook**
----------
This is an interactive coding environment. You can write Javascript, see it executed, and write comprehensive documentation using markdown.

- Click any text cell (including this one) to edit it
- The code in each code editor is joined into one file. If you define a variable in cell #1, you can refer to it in any of the following cells!
- Click the **Format** button in any code cell, and Prettier will its thing to your code!
- You can show any React component, string, number, or anything else by calling the `show` function. This is a function built into this environment. Call show multiple times to show multiple values
- Re-order or delete cells using the buttons on the top right
- Add new cells by hovering on the divider between each cell

All of your changes get saved to the file you opened JBook with. So if you ran `npx my-scrapbook serve`, all of the text and code you write will be saved to the `notebook.js` file.

Code samples for the code editor.

import { useState } from 'react';

const Counter = () => {
  const [count, setCount] = useState(0);
  return (
    <div>
      <button onClick={() => setCount(count + 1)}>Click</button>
      <h3>Count: {count}</h3>
    </div>
  );
};
// Display any variable or React Component by calling 'show'
show(<Counter />);
  import axios from 'axios';
  import 'bulma/css/bulma.css';

  axios.get('http://jsonplaceholder.typicode.com/users/1')
  .then(({ data }) => show(data.name));

sample

Future Functionality

  • Lots! This is just the beginning.