/code-book

Code snippets editor. Allows to save snippets. Compile, bundle and execute code inside the Browser. React + Typescript + ESBuild + Monaco Editor

Primary LanguageTypeScript

JS Code Snippets Redactor (CLI)

screen

Installation

To install and run application on your local computer:

npm install -g code-notebook
code-book serve

OR:

npx code-notebook serve

Options

To specify output file, where notes will be saved. (notebook.js by default)

npx install code-notebook serve filename

To specify port where app starts (4005 by default)

npx install code-notebook serve --port 3300

Features

  • ESBuild to transpile and bundle all the code directly in the browser
  • Custom plugins for ESBuild (to get packages from unpkg.com and correctly bundle them inside the browser: one plugin changes the paths to the npm packages and another set the appropriate content)
  • Monaco Text Editor (monaco-editor/react)
  • Prettier to format the user's code
  • Markdown Editor to handle text snippets
  • bulmaswatch/superhero theme for styling
  • State Managament: Redux, Immer, Thunk
  • Lerna to handle all packages