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

@junobuild/nextjs-plugin

v0.0.13

Published

A Next.js config wrapper for Juno

Downloads

43

Readme

npm license

Juno Next.js Plugin

A Next.js plugin for Juno.

Getting started

The plugin automatically loads your Satellite and Orbiter IDs.

With these values, you can instantiate Juno in your code without the need to manually define environment variables.

await Promise.all([
  initJuno({
    satelliteId: process.env.NEXT_PUBLIC_SATELLITE_ID
  }),
  initOrbiter({
    satelliteId: process.env.NEXT_PUBLIC_SATELLITE_ID,
    orbiterId: process.env.NEXT_PUBLIC_ORBITER_ID
  })
]);

Environment variables

Those following environment variables are injected by this plugin:

| Environment variable | Value in mode development | Value for other modes | | -------------------------------- | ----------------------------- | ------------------------------------------------------------------ | | NEXT_PUBLIC_SATELLITE_ID | jx5yt-yyaaa-aaaal-abzbq-cai | The Satellite ID for the mode from your Juno configuration file. | | NEXT_PUBLIC_ORBITER_ID | undefined | The Orbiter ID from your Juno configuration file. | | NEXT_PUBLIC_INTERNET_IDENTITY_ID | rdmx6-jaaaa-aaaaa-aaadq-cai | rdmx6-jaaaa-aaaaa-aaadq-cai | | NEXT_PUBLIC_ICP_LEDGER_ID | ryjl3-tyaaa-aaaaa-aaaba-cai | ryjl3-tyaaa-aaaaa-aaaba-cai | | NEXT_PUBLIC_ICP_INDEX_ID | qhbym-qaaaa-aaaaa-aaafq-cai | qhbym-qaaaa-aaaaa-aaafq-cai |

Variables prefixed with NEXT_PUBLIC_ are clearly marked for browser availability, but they are injected into the environment (documentation) by the plugin. If you prefer to remove or change this prefix, it is possible using the option prefix.

Installation

npm i @junobuild/nextjs-plugin -D

Usage

In your next.config.mjs file:

import {withJuno} from '@junobuild/nextjs-plugin';

export default withJuno();

The plugin sets the build output to export by default. You can override the option or provide additional options as follows:

import {withJuno} from '@junobuild/nextjs-plugin';

/** @type {import('next').NextConfig} */
const nextConfig = {
  output: 'export'
};

export default withJuno({nextConfig});

Options

The plugins can be initialized with the following options:

  • juno.container: true to use Juno Docker with default options, or specify an object.

The object accepts the following parameters:

  • An optional url as string, representing the container URL including the port, e.g. http://127.0.0.1:8000.
  • An optional list of modes for which the container should be used.

By default, the container is mounted only in development mode.

import {withJuno} from '@junobuild/nextjs-plugin';

/** @type {import('next').NextConfig} */
const nextConfig = {
  output: 'export'
};

export default withJuno({nextConfig, juno: {container: true}});

License

MIT © David Dal Busco