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
npm install codespacesUsage
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.devimport { getCodespacesEnvironment } from "codespaces";
// Get general JSON information about the current GitHub Codespaces
getCodespacesEnvironment().then(console.log); // { isCodespaces: true, ...