@wishyoulization/iridium-dev-server

1.1.0 • Public • Published

Iridium Dev Server

Local dev server for working with Observable notebooks.

Install

npm i @wishyoulization/iridium-dev-server

Run Development Server

npx @wishyoulization/iridium-dev-server

Static Build

-build flag will compile all .ojs files to esm modules .js without starting the development web server. npx @wishyoulization/iridium-dev-server -build

Configuration

Save .iridiumrc file in the application root directory to configure the dev server.

{
  "notebooks": "./src",
  "compiled": "./dist",
  "static:": "/path-to-serve-additional-static-assets",
  "port": 8080,
  "local_editor": false,
  "head": "<style>body{font-family:'Trebuchet MS';}</style>"
}
  1. notebooks and compiled are directories where .ojs and compiled esm modules .js will be saved to, by default they are saved to the root directory.
  2. The dev server by default starts on port 8080 and can be overridden using port property in config.
  3. local_editor can be set to true/false, to either serve the editor scripts locally or from unpkg CDN
  4. head is a string property for adding to the html page head section (for loading fonts or setting up libraries/scripts)

Note

Add to your npm package.json scripts for convenience.

"scripts": {
    "start":"iridium-dev-server",
    "build":"iridium-dev-server -build"
  }

Readme

Keywords

Package Sidebar

Install

npm i @wishyoulization/iridium-dev-server

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

11.9 kB

Total Files

4

Last publish

Collaborators

  • wishyoulization