Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dev-sandbox

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dev-sandbox

Sandbox for local development

  • 1.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
decreased by-14.29%
Maintainers
1
Weekly downloads
 
Created
Source

dev-sandbox [beta]

TypeScript code style: prettier npm version David David semantic-release
Play with your local code live in browser

dev-sandbox

Features

  • Deploys sandbox from root of your package.
  • Typescript ready. Recognizes the types of local files and installed packages.
  • Builds the code using esbuild and sends the result directly to the browser.
  • Syntax highlighting and code validation using monaco.

Install

You can install dev-sandbox globally and use it from any local package.

$ yarn global add dev-sandbox

or

$ npm i -g dev-sandbox

Configuration

cosmiconfig is used for managing configuration. Any of rc file can be used for config. For example: .sandboxrc, .sandboxrc.json, .sandboxrc.js, etc (see examples in cosmiconfig).

You can view an example of config below (.sandboxrc.js):

const initialCode = `
import React from 'react'
import ReactDOM from 'react-dom'
import ThemeProvider from './src/ThemeProvider'
import Button from './src/components/Button'

const App: React.FC = () => {
  return (
    <ThemeProvider>
      <Button>Hello</Button>
    </ThemeProvider>
  );
}

ReactDOM.render(<App />, document.getElementById('app'))
`;

module.exports = {
  // Option that enables the use of typescript (default: true)
  typescript: true,
  // Initial code in editor (default: '// Example...')
  initialCode
}

Usage

$ cd ./my-package
$ dev-sandbox

✔ Typescript config loaded from tsconfig.json
✔ Types generated
✔ Server listening on http://localhost:3000

License

dev-sandbox is MIT licensed.

Keywords

FAQs

Package last updated on 16 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc