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

juicy-repl

v0.1.10

Published

An extensible JavaScript REPL

Downloads

31

Readme

juicy-repl

An extensible JavaScript REPL

NPM

NPM version Downloads David devDependencies Status GitHub issues license GitHub stars Built with love

Powered by NodeJS Powered by express Powered by Monaco Powered by Rainglow Powered by react Powered by webpack Powered by babel Powered by gulp

Table Of Contents

Why use Juicy?

  • Juicy supports private npm packages. Just install juicy-repl globally and host it on your machine, tell it which packages to include, and in less than a minute you have a custom REPL running locally.
  • Flow. Juicy supports Flow syntax, allowing you to copy and paste directly from your source without making syntax modifications.
  • 300+ themes. Juicy implements all themes from Rainglow. Thanks to Dayle Rees for building these themes.
  • Same editor as VS Code.
  • Autocomplete/intellisense
  • Easy sharing. Quickly create a link to what you're working on and share it with anyone.
  • Save your work. Juicy allows you to pin your work and return to it at anytime without any need to signup or login.
  • Last but not least, Juicy is just plain awesome!

Demo

juicy-js.com

Running using global command

Install juicy-repl

# with npm
npm install -g juicy-repl

# with yarn
yarn global add juicy-repl

Example 1: out of the box quick start

juicy

Example 2: with command line args

juicy --port 80 --detach false --processTitle "custom-repl" --replPageTitle "My Custom REPL" --hideHeader true

Example 3: with config file

juicy --config "~/REPL_CONFIG.json"

Example 4: with config file added environment variables

# add to ~/.bash_profile
export JUICY_CONFIG=~/REPL_CONFIG.json
juicy

Running from within a program

Install juicy-repl

# with npm
npm install --save juicy-repl

# with yarn
yarn add juicy-repl
const juicy = require('juicy-repl');

// supply any, all, or no options
const options = { ... };

juicy(options)
    .then((app) => {
        // extend express app
        app.get('/custom/api', res.json({ data: 'custom' }));
    });

Default Options

{
    packages: [
        'ramda',
        'joi',
        'lodash',
        'bluebird',
        'moment',
        'uuid'
    ],
    aliases: {
        ramda: [
            'R',
            'Ramda'
        ],
        lodash: [
            '_'
        ],
        bluebird: [
            'Promise'
        ]
    },
    configPath: null,
    port: 3000,
    detach: true,
    processTitle: 'juicy-repl',
    replPageTitle: 'Juicy REPL',
    gaid: null,
    hideHeader: false,
    spinnerPath: null,
    spinnerBgColor: null,
    faviconPath: null,
    headerLogoPath: null,
    headerTitle: null,
    headerSubtitle: 'A JavaScript REPL that feels like an IDE',
    headerColor: null,
    headerFontColor: null
};

Options

options.packages

Type: Array<String>

Description: A list of npm packages to include when building the REPL.

Default value:

[
    'ramda',
    'joi',
    'lodash',
    'bluebird',
    'moment',
    'uuid'
]

options.aliases

Type: Object<String, Array<String>>

Description: Specify one or more aliases to expose as global variables for the packages.

Default value:

{
    ramda: [
        'R',
        'Ramda'
    ],
    lodash: [
        '_'
    ],
    bluebird: [
        'Promise'
    ]
}

options.configPath

Type: String

Description: Absolute path to config file.

Default value: null

Command Line: --configPath '~/REPL_CONFIG.json'


options.port

Type: Number

Description: The port number the REPL server will be exposed on.

Default value: 3000

Command Line: --port 80


options.detach

Type: Boolean

Description: If true, then the REPL server will detach into a child process and allow the main process to exit. Otheriwse the main process will suspend while the REPL server is running. It is suggested to set detach to false if using nohup or a process manager such as forever or pm2.

Default value: true

Command Line: --detach false


options.processTitle

Type: String

Description: The process.title for the REPL server process.

Default value: 'juicy-repl'

Command Line: --processTitle 'my-custom-repl'


options.replPageTitle

Type: String

Description: The document.title for the REPL browser app.

Default value: 'Juicy REPL'

Command Line: --replPageTitle 'My REPL'


options.gaid

Type: String

Description: Google Analytics ID. If set, then google analytics script is added to the page.

Default value: null

Command Line: --gaid 'UA-112996224-1'


options.hideHeader

Type: Boolean

Description: If true, then the header of the REPL will be hidden.

Default value: false

Command Line: --hideHeader true


options.spinnerPath

Type: String

Description: Set to absolute path of image to loading spinner.

Default value: null

Command Line: --spinnerPath '/Users/myuser/images/spinner.gif'


options.spinnerBgColor

Type: String

Description: If set, then the spinner will have a circular background filled with this color

Default value: null

Command Line: --spinnerBgColor '#FFFFFF'


options.faviconPath

Type: String

Description: Set to absolute path of image to override the favicon.

Default value: null

Command Line: --faviconPath '/Users/myuser/images/favicon.ico'


options.headerLogoPath

Type: String

Description: Set to absolute path of image to override logo in header.

Default value: null

Command Line: --headerLogoPath '/Users/myuser/images/my-repl-logo.png'


options.headerTitle

Type: String

Description: Overrides the title in the header. Use 'none' to hide the title.

Default value: null

Command Line: --headerTitle 'My REPL'


options.headerSubtitle

Type: String

Description: The subtitle in the header. Use 'none' to hide the subtitle.

Default value: 'A JavaScript REPL that feels like an IDE'

Command Line: --headerSubtitle 'powered by Juicy'


options.headerColor

Type: String

Description: If set, overrides the backgorund color of the header.

Default value: null

Command Line: --headerColor '#FF0000'


options.headerFontColor

Type: String

Description: If set, overrides the font color of the header.

Default value: null

Command Line: --headerFontColor '#FFFFFF'


Development

git clone https://github.com/djorg83/juicy
cd juicy
yarn dev

Author

Daniel Jorgensen

Contributors