JSPM

codespaces

0.1.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 20
  • Score
    100M100P100Q52070F
  • License MIT

Utility functions for use within, or for adding better project support for GitHub Codespaces

Package Exports

  • codespaces
  • codespaces/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (codespaces) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

GitHub Codespaces Utilities

Utility for adding better project support for GitHub Codespaces.

Welcome to the codespaces repository. This package simply gives a couple functions for accessing to GitHub Codespaces related information. It can help you add better project support for GitHub codespaces, especially pertaining to either side of applications which are not fully contained.

Installation   ·   Usage

Installation

npm install codespaces

Usage

import { getCodespacesTunnelUrl } from "codespaces";

// Get the current GitHub Codespaces tunnel URL at a specific port.
getCodespacesTunnelUrl({ port: 2000 }).then(console.log); // https://ridafkih-code...-2000.githubpreview.dev
import { getCodespacesEnvironment } from "codespaces";

// Get general JSON information about the current GitHub Codespaces
getCodespacesEnvironment().then(console.log); // { isCodespaces: true, ...