0.0.17 • Published 2 years ago

ocularbook v0.0.17

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Warning The project is still in it's experimental phase. There might be missing features and the API will be subjected to changes

OcularBook for Svelte with Vite

Built with Svelte + TS + Vite + HeroIcons

Freaking fast! ⚡⚡ (Thanks to Vite and Svelte)

Getting started

Install dependency from npm to your existing Svelte+Vite project

pnpm add ocularbook
yarn add ocularbook
npm install ocularbook

Add files in ending with stories.svelte (eg: Counter.stories.svelte) to your project to preview them with Ocularbook

Screenshot of Ocularbook

Features

  • Preview svelte files matching *.stories.svelte
  • Hot Module Replacement
  • Add Global Configuration via .ocularbook/Global.svelte

Global configuration via Global.svelte

The following is an example Global.svelte which does a few things,

  • Imports external resources
  • Sets the title of the page
  • Sets global CSS styles
<svelte:head>
  <!-- Updates page title -->
  <title>Updated Title</title>

  <!-- Imports external resources from the html head -->
  <link rel="preconnect" href="https://fonts.googleapis.com" />
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="anonymous" />
  <link href="https://fonts.googleapis.com/css2?family=Poppins&display=swap" rel="stylesheet" />
</svelte:head>

<style>
  /* Updates global html styles */
  :global(html) {
    font-family: "Poppins", sans-serif;
    background: #eee;
    color: #201d30;
  }
</style>
0.0.17

2 years ago

0.0.16

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.1

2 years ago